Change IndexPack to use ObjectIdSubclassMap instead of ObjectIdMap
commit27e4aa0be60e0f66ee4e4407f854f3c4ebf5c4bb
authorShawn O. Pearce <spearce@spearce.org>
Wed, 29 Apr 2009 18:54:42 +0000 (29 11:54 -0700)
committerRobin Rosenberg <robin.rosenberg@dewire.com>
Wed, 29 Apr 2009 23:49:06 +0000 (30 01:49 +0200)
tree488a1f862447009809ed17161c6df75cadb887f6
parentb16aa00a9ef8c3f6bfcdc514a85e99ba096efd77
Change IndexPack to use ObjectIdSubclassMap instead of ObjectIdMap

The ObjectIdSubclassMap performs slightly better on average than the
ObjectIdMap, and uses a lot less memory as we don't need to allocate
a tree node per tracked object.

This reduces the memory footprint of IndexPack, by storing a linked
list of the UnresolvedDelta objects directly in each map, which is
slightly smaller than using an ArrayList inside of a TreeMap.

Performance is marginally faster, but we now can declare ObjectIdMap
to be fully deprecated and start removing it from the library.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
org.spearce.jgit/src/org/spearce/jgit/lib/ObjectIdSubclassMap.java
org.spearce.jgit/src/org/spearce/jgit/transport/IndexPack.java