Don't unpack delta chains while writing a pack from a pack v1 index
commit3687d2c8cebc289e143673a9fdc4ae54eac444a3
authorShawn O. Pearce <spearce@spearce.org>
Thu, 25 Dec 2008 02:11:10 +0000 (24 18:11 -0800)
committerRobin Rosenberg <robin.rosenberg@dewire.com>
Sun, 4 Jan 2009 00:06:07 +0000 (4 01:06 +0100)
tree0ea963e7944331e567d493e19d8f46f66376c47f
parentb8c4ed895527e1551fc707a0e25e350d47dc1e6e
Don't unpack delta chains while writing a pack from a pack v1 index

We only need to inflate the delta to verify the content is sane;
going all the way through the delta chain by getCachedBytes is
a massive expensive that we just cannot afford to pay.  This
simple change improves clone time for the Linux kernel from
14m50s to 3m20s, due to the improved throughput in our write
objects phase.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
org.spearce.jgit/src/org/spearce/jgit/lib/ByteArrayWindow.java
org.spearce.jgit/src/org/spearce/jgit/lib/ByteBufferWindow.java
org.spearce.jgit/src/org/spearce/jgit/lib/ByteWindow.java
org.spearce.jgit/src/org/spearce/jgit/lib/PackFile.java
org.spearce.jgit/src/org/spearce/jgit/lib/WindowCursor.java
org.spearce.jgit/src/org/spearce/jgit/lib/WindowedFile.java