RevList: Optimize revision walking

This is a naive approach at optimizing the revision walking.
This commit is contained in:
Pieter de Bie
2008-11-08 23:22:21 +01:00
parent bcc167be1b
commit b8e1b6da77
+3 -5
View File
@@ -117,7 +117,7 @@
[self performSelectorOnMainThread:@selector(setCommits:) withObject:revisions waitUntilDone:NO];
g = [[PBGitGrapher alloc] initWithRepository: repository];
revisions = [NSMutableArray array];
currentLine = [NSMutableString string];
[currentLine = setString: @""];
continue;
}
@@ -125,7 +125,7 @@
NSArray* components = [currentLine componentsSeparatedByString:@"\01"];
if ([components count] < 5) {
NSLog(@"Can't split string: %@", currentLine);
currentLine = [NSMutableString string];
[currentLine = setString: @""];
continue;
}
@@ -148,13 +148,11 @@
[self performSelectorOnMainThread:@selector(setCommits:) withObject:revisions waitUntilDone:NO];
currentLine = [NSMutableString string];
[currentLine = setString: @""];
}
// Make sure the commits are stored before exiting.
[self performSelectorOnMainThread:@selector(setCommits:) withObject:revisions waitUntilDone:YES];
[NSThread exit];
}
@end