]> source.dussan.org Git - jgit.git/commit
Avoid storing large packs in block cache during reuse 87/46387/3
authorShawn Pearce <spearce@spearce.org>
Thu, 23 Apr 2015 19:12:43 +0000 (12:12 -0700)
committerShawn Pearce <spearce@spearce.org>
Fri, 24 Apr 2015 03:22:13 +0000 (20:22 -0700)
commitc761c8bb5c02c816dd233f3d47ce138c216e870b
tree1dc4fa1ce9991cfa2aee488d37ace4fb5c40c333
parent12e38d72758b486f19ccfa6c830d1ef95dfb1d11
Avoid storing large packs in block cache during reuse

When a large pack (> 30% of the block cache) is being reused by
copying it pollutes the block cache with noise by storing blocks
that are never referenced again.

Avoid this by streaming the file directly from its channel onto
the output stream.

Change-Id: I2e53de27f3dcfb93de68b1fad45f75ab23e79fe7
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsBlockCache.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsBlockCacheConfig.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReader.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReaderOptions.java
org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java