{"thread":{"id":"19091","subject":"[JGIT PATCH] Fix performance problem recently introduced to DeltaPackedObjectLoader","startedAt":"2009-04-27T21:44:57Z","lastAt":"2009-04-27T21:44:57Z","messageCount":1,"participants":["Shawn O. Pearce"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"112463","messageId":"1240868697-30971-1-git-send-email-spearce@spearce.org","threadId":"19091","inReplyTo":null,"subject":"[JGIT PATCH] Fix performance problem recently introduced to DeltaPackedObjectLoader","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2009-04-27T21:44:57Z","receivedAt":"2009-04-27T21:44:57Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"In fe6c8248e1ed6bd9db76a8314103081a02d55393 (\"Fully materialize an\nObjectLoader before returning it from ObjectDatabase\") I missed a\ncrucial return call here in DeltaPackedObjectLoadeder.  That one\nmissing line caused cache hits in the UnpackedObjectCache to then\nfall through and unpack the delta base, and apply the delta onto\nit, ignoring the fact that we had a successful cache hit.\n\nWhen packing and serving e.g. the Linux kernel repository this\nresulted in a 10x increase in the number of WindowCache.get()\ninvocations we saw, as the UnpackedObjectCache was useless.\n\nSigned-off-by: Shawn O. Pearce <spearce@spearce.org>\n---\n .../spearce/jgit/lib/DeltaPackedObjectLoader.java  |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\ndiff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/DeltaPackedObjectLoader.java b/org.spearce.jgit/src/org/spearce/jgit/lib/DeltaPackedObjectLoader.java\nindex 8194d94..7d3f30d 100644\n--- a/org.spearce.jgit/src/org/spearce/jgit/lib/DeltaPackedObjectLoader.java\n+++ b/org.spearce.jgit/src/org/spearce/jgit/lib/DeltaPackedObjectLoader.java\n@@ -69,6 +69,7 @@ public void materialize(final WindowCursor curs) throws IOException {\n \t\t\t\tobjectType = cache.type;\n \t\t\t\tobjectSize = cache.data.length;\n \t\t\t\tcachedBytes = cache.data;\n+\t\t\t\treturn;\n \t\t\t}\n \t\t}\n \n-- \n1.6.3.rc1.205.g37f8\n"}]}