]> source.dussan.org Git - jgit.git/commit
Reduce memory held and speed up DfsGarbageCollector. 51/9851/2
authorColby Ranger <cranger@google.com>
Tue, 22 Jan 2013 22:54:05 +0000 (14:54 -0800)
committerColby Ranger <cranger@google.com>
Tue, 22 Jan 2013 23:25:15 +0000 (15:25 -0800)
commit7fbd6588bed5e5dbed01ad2c85797d86596e5b71
treebbf04d9e314029bad8bccee3ce79cd7307258b9b
parent38b503601a6d3552a558751871906354ba1beca5
Reduce memory held and speed up DfsGarbageCollector.

getObjectList() returns a list of ObjectToPack. These can hold on to a
lot of memory. Furthermore, binary searching for objects in a sorted
array can be slow. Improve the speed and reduce the memory by creating a
copy of the ObjectId and inserting it into an ObjectIdOwnerMap.

Change-Id: Ib5aa5b7447e05938b47fa55812a87b9872c20ea7
org.eclipse.jgit/src/org/eclipse/jgit/storage/dfs/DfsGarbageCollector.java
org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java