Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn O. Pearce2011-03-09 22:34:27 +0000
committerShawn O. Pearce2011-03-09 22:34:27 +0000
commit16350bf9e41118425c70832f5b9127de6aebfdea (patch)
treea4b9d44cc422483949aeb7fa4fddcdce60e166ca /org.eclipse.jgit
parentda548dfd2b8ef9842cbb0c7da7183f50d93018a4 (diff)
downloadjgit-16350bf9e41118425c70832f5b9127de6aebfdea.tar.gz
jgit-16350bf9e41118425c70832f5b9127de6aebfdea.tar.xz
jgit-16350bf9e41118425c70832f5b9127de6aebfdea.zip
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 <spearce@spearce.org>
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectIdSubclassMap.java2
1 files changed, 1 insertions, 1 deletions
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 6162c221a3..ee76a42807 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 @@ import java.util.NoSuchElementException;
* type of subclass of ObjectId that will be stored in the map.
*/
public class ObjectIdSubclassMap<V extends ObjectId> implements Iterable<V> {
- private static final int INITIAL_TABLE_SIZE = 32;
+ private static final int INITIAL_TABLE_SIZE = 2048;
private int size;

Back to the top