]> source.dussan.org Git - jgit.git/commit
DfsFsck: reduce memory usage during verifyIndex 14/103914/2
authorShawn Pearce <spearce@spearce.org>
Wed, 30 Aug 2017 01:40:03 +0000 (18:40 -0700)
committerShawn Pearce <spearce@spearce.org>
Wed, 30 Aug 2017 10:11:53 +0000 (03:11 -0700)
commite5db7c1f0e7431e68e854dc1152633999cf01555
treea03424b45e032423b46b9661906c5ef8a1905fda
parent69588c21fe2b2dd578a51015b5331dcb1b6fb9c0
DfsFsck: reduce memory usage during verifyIndex

Don't convert a lot of ObjectId to String stored in generic
java.util.HashSet.  This is a very expensive way to store objects.

Instead rely on "this" from the FsckPackParser to lookup information
about the objects in this pack file, which lets the verify code avoid
sorting the object list.

Use ObjectIdOwnerMap, which is the most efficient format JGit has
for storing lots of objects.

Change-Id: Ib68f93acb4d91b96d0a44c0612f704500d332ac1
org.eclipse.jgit/src/org/eclipse/jgit/internal/fsck/FsckPackParser.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsFsck.java