From 16350bf9e41118425c70832f5b9127de6aebfdea Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Wed, 9 Mar 2011 14:34:27 -0800 Subject: [PATCH] ObjectIdSubclassMap: Change initial size to 2048 32 is way to small for the map. Most applications using the map will need to load more than 16 objects just from the root refs being read from the Repository. Default the initial size to 2048. This cuts out 6 expansions in the early life of the table, reducing garbage and rehashing time. Change-Id: I6dd076ebc0b284f1755855d383b79535604ac547 Signed-off-by: Shawn O. Pearce --- .../src/org/eclipse/jgit/lib/ObjectIdSubclassMap.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectIdSubclassMap.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectIdSubclassMap.java index 6162c221a..ee76a4280 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectIdSubclassMap.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectIdSubclassMap.java @@ -63,7 +63,7 @@ * type of subclass of ObjectId that will be stored in the map. */ public class ObjectIdSubclassMap implements Iterable { - private static final int INITIAL_TABLE_SIZE = 32; + private static final int INITIAL_TABLE_SIZE = 2048; private int size;