mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
RevList: Optimize revision walking
This is a naive approach at optimizing the revision walking.
This commit is contained in:
+3
-5
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user