]> source.dussan.org Git - jgit.git/commit
Remove unnecessary note fanout when removing notes 55/1855/4
authorShawn O. Pearce <spearce@spearce.org>
Fri, 5 Nov 2010 02:01:51 +0000 (19:01 -0700)
committerShawn O. Pearce <spearce@spearce.org>
Fri, 12 Nov 2010 22:01:28 +0000 (14:01 -0800)
commite7e9a47b5222fd3dd1f989c413f4220444ecb23d
tree652bb67529561c705f89ef7fc4e82731dbb5469f
parent2b0df15f7f1bdcfc41349c478319fad50158c183
Remove unnecessary note fanout when removing notes

Fanout level notes trees are combined back together into a flat leaf
level tree if during a removal of a subtree there are less than 3/4 of
the fanout subtrees still existing, and the size of the combined leaf
is under the 256 split limit noted above.

This rule is used because deletes are less common than insertions, and
SHA-1's relatively uniform distribution suggests that with only 192
subtrees existing in the fanout, there should be approximately 192
names in the combined replacement leaf tree.

Change-Id: Ia9d145ffd5454982509fc40906bc4dbbf2b13952
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
org.eclipse.jgit/src/org/eclipse/jgit/notes/FanoutBucket.java
org.eclipse.jgit/src/org/eclipse/jgit/notes/LeafBucket.java
org.eclipse.jgit/src/org/eclipse/jgit/notes/NoteBucket.java