Fix performance problem recently introduced to DeltaPackedObjectLoader
commit01402cdcb9b1f19c6603ec226b63ebdb270d3995
authorShawn O. Pearce <spearce@spearce.org>
Wed, 29 Apr 2009 18:54:39 +0000 (29 11:54 -0700)
committerRobin Rosenberg <robin.rosenberg@dewire.com>
Wed, 29 Apr 2009 23:49:06 +0000 (30 01:49 +0200)
tree0c7b520af3e089e513518717037ff303681f5dfb
parentcf8942d59d0429ee7ec498a3e6307d6a4d796230
Fix performance problem recently introduced to DeltaPackedObjectLoader

In fe6c8248e1ed6bd9db76a8314103081a02d55393 ("Fully materialize an
ObjectLoader before returning it from ObjectDatabase") I missed a
crucial return call here in DeltaPackedObjectLoadeder.  That one
missing line caused cache hits in the UnpackedObjectCache to then
fall through and unpack the delta base, and apply the delta onto
it, ignoring the fact that we had a successful cache hit.

When packing and serving e.g. the Linux kernel repository this
resulted in a 10x increase in the number of WindowCache.get()
invocations we saw, as the UnpackedObjectCache was useless.

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/DeltaPackedObjectLoader.java