Disable topological sorting in PackWriter

Its not strictly required that we sort topologically in order to
produce a valid pack file.  This was just something that Linus
thought would be a good idea to do.  In practice its not that
important for most repositories.  Local file IO quickly falls
out of the pattern that topological sorting provides any sort
of benefit for, so expending extra resources to enforce it when
we make a pack isn't really worth it.

I'm removing this sort in the pipeline because later changes
would support really efficient COMMIT_TIME_DESC sorting on a
non-file storage system, but TOPO sorting would be a bit more
ugly to run, due to the in-memory delays it imposes.

Change-Id: I0121453461c2140c6917cb10c6df584eb47e5795
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
This commit is contained in:
Shawn O. Pearce 2010-06-14 18:31:14 -07:00
parent ccd0c0c911
commit 60aae90d4d
1 changed files with 1 additions and 2 deletions

View File

@ -821,8 +821,7 @@ private ObjectWalk setUpWalker(
IncorrectObjectTypeException {
final ObjectWalk walker = new ObjectWalk(db);
walker.setRetainBody(false);
walker.sort(RevSort.TOPO);
walker.sort(RevSort.COMMIT_TIME_DESC, true);
walker.sort(RevSort.COMMIT_TIME_DESC);
if (thin)
walker.sort(RevSort.BOUNDARY, true);