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>
This commit is contained in:
Shawn O. Pearce 2011-03-09 14:34:27 -08:00
parent da548dfd2b
commit 16350bf9e4
1 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,7 @@
* 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;