]> source.dussan.org Git - jgit.git/commit
GC: Trim EWAHCompressedBitmaps to free unused memory 48/125848/3
authorTerry Parker <tparker@google.com>
Tue, 10 Jul 2018 00:42:21 +0000 (17:42 -0700)
committerJonathan Nieder <jrn@google.com>
Tue, 10 Jul 2018 18:10:11 +0000 (14:10 -0400)
commit04b9f44367f578f66129ec58f09a448041feedc4
tree15fc8be8d4a5bd226fdf9944f6aa93993e7f3cfc
parentdd7d479bd4e4bad08f282d29bc14295029c54d8e
GC: Trim EWAHCompressedBitmaps to free unused memory

The "Building bitmaps" GC phase fails for large repositories (repos with
10M objects use 1.25MB per uncompressed bitmap, and those with long
histories may build >25k bitmaps). Since these bitmaps xor well against
each other, the actual space needed for each compressed bitmap is
usually no more than a few KB. Calling trim() will ensure we aren't
holding on to excess memory.

Change-Id: I40bf78c730b9f6051da6025f9777ce27220a5b0a
Signed-off-by: Terry Parker <tparker@google.com>
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexBuilder.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexRemapper.java