From cb0c05b5b48702f8c8ef0aae2b398d685d4d41d5 Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Wed, 25 Aug 2010 17:05:31 -0700 Subject: [PATCH] Increase the default streaming threshold to 15 MiB Applying deltas in the large streaming mode is horrifically slow. Trying to pack icu4c is impossible because a single 11 MiB file sits on top of a 15 MiB file though a 10 deep delta chain, which results in this very slow inflate process. Upping the default limit to 15 MiB lets us process this large in a reasonable time, but its still sufficiently low enough to prevent exploding the heap of a very large process like Eclipse or Gerrit Code Review. We have to revisit the streaming delta application process and do something much smarter, like flatten the delta chain before we apply it to the base. But even that is ugly, I've seen a 155 MiB delta sitting on top of a 450 MiB file to produce a 300 MiB result object. If the chain is deep, we may have trouble flatting it down. Change-Id: If5a0dcbf9d14ea683d75546f104b09bb8cd8fdbb Signed-off-by: Shawn O. Pearce --- org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectLoader.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectLoader.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectLoader.java index 661a5e8eb..f638cc794 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectLoader.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectLoader.java @@ -66,7 +66,7 @@ public abstract class ObjectLoader { * Objects larger than this size must be accessed as a stream through the * loader's {@link #openStream()} method. */ - public static final int STREAM_THRESHOLD = 1024 * 1024; + public static final int STREAM_THRESHOLD = 15 * 1024 * 1024; /** * @return Git in pack object type, see {@link Constants}.