@matheusbsbs / matheus-bagliano / commits / 9181ca2c2b
Fork 0

rev-list: memory usage reduction.

We do not need to track object refs, neither we need to save commit unless we are doing verbose header. A lot of traversal happens inside prepare_revision_walk() these days so setting things up before calling that function is necessary. Signed-off-by: Junio C Hamano <junkio@cox.net> Acked-by: Linus Torvalds <torvalds@osdl.org>

Junio C Hamano committed Mar 28, 2006 at 17:28 UTC 9181ca2c2b1f2897baa67ff8e48b1984822115b5
1 file changed +3 -3
rev-list.c
+3 -3
@@ -358,6 +358,9 @@ int main(int argc, const char **argv)
358 (!(revs.tag_objects||revs.tree_objects||revs.blob_objects) && !revs.pending_objects))
359 usage(rev_list_usage);
360
361 + save_commit_buffer = verbose_header;
362 + track_object_refs = 0;
363 +
364 prepare_revision_walk(&revs);
365 if (revs.tree_objects)
366 mark_edges_uninteresting(revs.commits);
@@ -365,9 +368,6 @@ int main(int argc, const char **argv)
368 if (bisect_list)
369 revs.commits = find_bisection(revs.commits);
370
368 - save_commit_buffer = verbose_header;
369 - track_object_refs = 0;
370 -
371 show_commit_list(&revs);
372
373 return 0;