]> source.dussan.org Git - jgit.git/commit
PackWriter: shed memory while creating bitmaps 78/53678/2
authorShawn Pearce <spearce@spearce.org>
Thu, 13 Aug 2015 05:58:26 +0000 (22:58 -0700)
committerShawn Pearce <spearce@spearce.org>
Thu, 13 Aug 2015 17:13:44 +0000 (10:13 -0700)
commit4bb523475d44ec1c4d9b4f92944a359aef99894c
tree1cd5fb86047f5e36fb387dbe8dd2067e2500e79b
parent20d9ab00ae7c5f89d388206b58276700a8a5d4c8
PackWriter: shed memory while creating bitmaps

Once bitmap creation begins the internal maps required for packing are
no longer necessary.  On a repository with 5.2M objects this can save
more than 438 MiB of memory by allowing the ObjectToPack instances to
get garbage collected away.

Downside is the PackWriter cannot be used for any further opertions
except to write the bitmap index.  This is an acceptable trade-off as
in practice nobody uses the PackWriter after the bitmaps are built.

Change-Id: Ibfaf84b22fa0590896a398ff659a91fcf03d7128
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java