]> source.dussan.org Git - jgit.git/commit
Avoid storing large packs in block cache during reuse 87/46387/2
authorShawn Pearce <spearce@spearce.org>
Thu, 23 Apr 2015 19:12:43 +0000 (12:12 -0700)
committerShawn Pearce <spearce@spearce.org>
Thu, 23 Apr 2015 22:21:59 +0000 (15:21 -0700)
commitf2efcdc6f769d59722b17e9274932d585035cfb6
treeacff37e9f15333a3aada29109ff7f712aec811ca
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