summaryrefslogtreecommitdiff
path: root/fetch.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@osdl.org>2005-09-16 21:32:48 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-09-16 22:19:07 (GMT)
commitb0d8923ec01fd91b75ab079034f89ced91500157 (patch)
treee551a6d9a5e594e3e71448956db0f246298ca941 /fetch.c
parentd0ac30f20ca1dd1d28a1b84bf13687f09cf535ae (diff)
downloadgit-b0d8923ec01fd91b75ab079034f89ced91500157.zip
git-b0d8923ec01fd91b75ab079034f89ced91500157.tar.gz
git-b0d8923ec01fd91b75ab079034f89ced91500157.tar.bz2
[PATCH] Improve git-rev-list memory usage further
This avoids keeping tree entries around, and free's them as it traverses the list. This avoids building up a huge memory footprint just for these small but very common allocations. Before: $ /usr/bin/time git-rev-list --objects v2.6.12..HEAD | wc -l 11.65user 0.38system 0:12.65elapsed 95%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+42934minor)pagefaults 0swaps 59124 After: $ /usr/bin/time git-rev-list --objects v2.6.12..HEAD | wc -l 12.28user 0.29system 0:12.57elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+26718minor)pagefaults 0swaps 59124 Note how the minor fault numbers - which ends up being how many pages we needed to map - go down from 42934 (167 MB) to 26718 (104 MB). That is: Before: 42934 minor pagefaults After: 26718 minor pagefaults This is all in _addition_ to the previous fixes. It used to be ~48,000 pagefaults. That's still a honking big memory footprint, but it's about half of what it was just a day or two ago (and this is the object list for a pretty big update - almost 60,000 objects. Smaller updates need less memory). Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'fetch.c')
0 files changed, 0 insertions, 0 deletions