diff options
author | Yunjie Li <yunjieli@google.com> | 2020-04-29 15:27:47 -0700 |
---|---|---|
committer | Yunjie Li <yunjieli@google.com> | 2020-05-12 17:32:15 -0700 |
commit | 913234e2ec299a30c8795d84e5ef52a683416cde (patch) | |
tree | e4196d1cf8060ca1709e024526c875f78b2b666f /org.eclipse.jgit | |
parent | 3aee92478c2cbc67cd921533437b824e43ed9798 (diff) | |
download | jgit-913234e2ec299a30c8795d84e5ef52a683416cde.tar.gz jgit-913234e2ec299a30c8795d84e5ef52a683416cde.zip |
PackBitmapIndex: Set distance threshold
Setting the distance threshold to 2000 in PackWriterBitmapPreparer to
reduce memory usage in garbage collection. When the threshold is 0, GC
for the msm repository would use about 37 GB memory to complete. After
setting it to 2000, GC can finish in 75 min with about 10 GB memory.
Change-Id: I39783eeecbae58261c883735499e61ee1cac75fe
Signed-off-by: Yunjie Li <yunjieli@google.com>
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriterBitmapPreparer.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriterBitmapPreparer.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriterBitmapPreparer.java index fefe565ad8..f1ede2acff 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriterBitmapPreparer.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriterBitmapPreparer.java @@ -58,7 +58,7 @@ class PackWriterBitmapPreparer { private static final int DAY_IN_SECONDS = 24 * 60 * 60; - private static final int DISTANCE_THRESHOLD = 0; + private static final int DISTANCE_THRESHOLD = 2000; private static final Comparator<RevCommit> ORDER_BY_REVERSE_TIMESTAMP = ( RevCommit a, RevCommit b) -> Integer |