]> source.dussan.org Git - jgit.git/commit
WindowCache: add option to use strong refs to reference ByteWindows 49/155149/5
authorMatthias Sohn <matthias.sohn@sap.com>
Fri, 13 Dec 2019 00:18:12 +0000 (01:18 +0100)
committerMatthias Sohn <matthias.sohn@sap.com>
Mon, 20 Jan 2020 16:53:08 +0000 (17:53 +0100)
commit709f83d489b777c21ad5bbeeb3e8b1232b3f0ee5
tree4de96eb44fd6928748be43f5e2fe47d51efd6692
parent6185db3d776f1064af1972b4ba2175a917c35ab3
WindowCache: add option to use strong refs to reference ByteWindows

Java GC evicts all SoftReferences when the used heap size comes close to
the maximum heap size. This means peaks in heap memory consumption can
flush the complete WindowCache which was observed to have negative
impact on performance of upload-pack in Gerrit.

Hence add a boolean option core.packedGitUseStrongRefs to allow using
strong references to reference packfile pages cached in the WindowCache.

If this option is set to true Java gc can no longer flush the
WindowCache to free memory if the used heap comes close to the maximum
heap size. On the other hand this provides more predictable performance.

Bug: 553573
Change-Id: I9de406293087ab0fa61130c8e0829775762ece8d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/WindowCacheGetTest.java
org.eclipse.jgit/.settings/.api_filters
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/WindowCache.java
org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java
org.eclipse.jgit/src/org/eclipse/jgit/storage/file/WindowCacheConfig.java