]> source.dussan.org Git - jgit.git/commit
Estimate the amount of memory used by a PackWriter 94/4594/2
authorDave Borowitz <dborowitz@google.com>
Thu, 10 Nov 2011 20:53:50 +0000 (12:53 -0800)
committerDave Borowitz <dborowitz@google.com>
Mon, 14 Nov 2011 18:27:45 +0000 (10:27 -0800)
commitf26b79d04453b64ab9eead7130b099c7c90fd9ab
tree09b8c1f6ccb638f9fc66f5b39890807ed906b413
parent16b8ebf2d1d099ac355767b1b1853ae7bf8854f1
Estimate the amount of memory used by a PackWriter

Memory usage is dominated by three terms:
 - The maximum memory allocated to each delta window.
 - The maximum size of a single file held in memory during delta search.
 - ObjectToPack instances owned by the writer.

For the first two terms, rather than doing complex instrumentation of
the DeltaWindows, we just overestimate based on the config parameters
(though we may underestimate if the maximum size is not set).

For the ObjectToPack instances, we do some rough byte accounting of the
underlying Java object representation.

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