Revision f43ba60e2c3bec4925eee229fa0f420dd1296f0c authored by Linus Torvalds on 13 April 2006, 17:01:02 UTC, committed by Junio C Hamano on 13 April 2006, 18:26:56 UTC
This trivially avoids keeping the commit message data around after we
don't need it any more, avoiding a continually growing "git log" memory
footprint.

It's not a huge deal, but it's somewhat noticeable. For the current kernel
tree, doing a full "git log" I got

 - before: /usr/bin/time git log > /dev/null
	0.81user 0.02system 0:00.84elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
	0inputs+0outputs (0major+8851minor)pagefaults 0swaps

 - after: /usr/bin/time git log > /dev/null
	0.79user 0.03system 0:00.83elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
	0inputs+0outputs (0major+5039minor)pagefaults 0swaps

ie the touched pages dropped from 8851 to 5039. For the historic kernel
archive, the numbers are 18357->11037 minor page faults.

We could/should in theory free the commits themselves, but that's really a
lot harder, since during revision traversal we may hit the same commit
twice through different children having it as a parent, even after we've
shown it once (when that happens, we'll silently ignore it next time, but
we still need the "struct commit" to know).

And as the commit message data is clearly the biggest part of the commit,
this is the really easy 60% solution.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent d533524
History
File Mode Size
t4100
.gitignore -rw-r--r-- 6 bytes
Makefile -rw-r--r-- 422 bytes
README -rw-r--r-- 6.6 KB
annotate-tests.sh -rw-r--r-- 3.2 KB
diff-lib.sh -rwxr-xr-x 1.4 KB
lib-read-tree-m-3way.sh -rwxr-xr-x 4.1 KB
t0000-basic.sh -rwxr-xr-x 7.6 KB
t0010-racy-git.sh -rwxr-xr-x 609 bytes
t1000-read-tree-m-3way.sh -rwxr-xr-x 16.3 KB
t1001-read-tree-m-2way.sh -rwxr-xr-x 10.2 KB
t1002-read-tree-m-u-2way.sh -rwxr-xr-x 9.7 KB
t1100-commit-tree-options.sh -rwxr-xr-x 1.1 KB
t1200-tutorial.sh -rwxr-xr-x 4.1 KB
t1300-repo-config.sh -rwxr-xr-x 5.3 KB
t2000-checkout-cache-clash.sh -rwxr-xr-x 1.2 KB
t2001-checkout-cache-clash.sh -rwxr-xr-x 2.4 KB
t2002-checkout-cache-u.sh -rwxr-xr-x 740 bytes
t2003-checkout-cache-mkdir.sh -rwxr-xr-x 2.5 KB
t2004-checkout-cache-temp.sh -rwxr-xr-x 5.5 KB
t2100-update-cache-badpath.sh -rwxr-xr-x 1.0 KB
t3000-ls-files-others.sh -rwxr-xr-x 1.1 KB
t3001-ls-files-others-exclude.sh -rwxr-xr-x 1.3 KB
t3002-ls-files-dashpath.sh -rwxr-xr-x 1.2 KB
t3010-ls-files-killed-modified.sh -rwxr-xr-x 2.0 KB
t3020-ls-files-error-unmatch.sh -rwxr-xr-x 650 bytes
t3100-ls-tree-restrict.sh -rwxr-xr-x 3.6 KB
t3101-ls-tree-dirname.sh -rwxr-xr-x 3.7 KB
t3200-branch.sh -rwxr-xr-x 909 bytes
t3300-funny-names.sh -rwxr-xr-x 4.0 KB
t3400-rebase.sh -rwxr-xr-x 902 bytes
t3401-rebase-partial.sh -rwxr-xr-x 1.2 KB
t3500-cherry.sh -rwxr-xr-x 1.4 KB
t3600-rm.sh -rwxr-xr-x 1.9 KB
t3700-add.sh -rwxr-xr-x 416 bytes
t4000-diff-format.sh -rwxr-xr-x 1.0 KB
t4001-diff-rename.sh -rwxr-xr-x 1.0 KB
t4002-diff-basic.sh -rwxr-xr-x 14.5 KB
t4003-diff-rename-1.sh -rwxr-xr-x 4.0 KB
t4004-diff-rename-symlink.sh -rwxr-xr-x 1.5 KB
t4005-diff-rename-2.sh -rwxr-xr-x 2.8 KB
t4006-diff-mode.sh -rwxr-xr-x 1006 bytes
t4007-rename-3.sh -rwxr-xr-x 2.7 KB
t4008-diff-break-rewrite.sh -rwxr-xr-x 5.9 KB
t4009-diff-rename-4.sh -rwxr-xr-x 2.8 KB
t4010-diff-pathspec.sh -rwxr-xr-x 1.7 KB
t4011-diff-symlink.sh -rwxr-xr-x 1.7 KB
t4100-apply-stat.sh -rwxr-xr-x 1.2 KB
t4101-apply-nonl.sh -rwxr-xr-x 647 bytes
t4102-apply-rename.sh -rwxr-xr-x 689 bytes
t4103-apply-binary.sh -rwxr-xr-x 3.0 KB
t4109-apply-multifrag.sh -rwxr-xr-x 2.7 KB
t4110-apply-scan.sh -rwxr-xr-x 1.3 KB
t4112-apply-renames.sh -rwxr-xr-x 3.2 KB
t5000-tar-tree.sh -rwxr-xr-x 2.7 KB
t5300-pack-object.sh -rwxr-xr-x 4.9 KB
t5400-send-pack.sh -rwxr-xr-x 1.4 KB
t5500-fetch-pack.sh -rwxr-xr-x 2.7 KB
t5600-clone-fail-cleanup.sh -rwxr-xr-x 897 bytes
t6000lib.sh -rwxr-xr-x 2.5 KB
t6002-rev-list-bisect.sh -rwxr-xr-x 8.2 KB
t6003-rev-list-topo-order.sh -rwxr-xr-x 8.5 KB
t6010-merge-base.sh -rwxr-xr-x 1.2 KB
t6020-merge-df.sh -rwxr-xr-x 528 bytes
t6021-merge-criss-cross.sh -rwxr-xr-x 1.3 KB
t6022-merge-rename.sh -rwxr-xr-x 5.1 KB
t6101-rev-parse-parents.sh -rwxr-xr-x 1.6 KB
t7001-mv.sh -rwxr-xr-x 1.0 KB
t7101-reset.sh -rwxr-xr-x 1.4 KB
t8001-annotate.sh -rwxr-xr-x 114 bytes
t8002-blame.sh -rwxr-xr-x 111 bytes
test-lib.sh -rwxr-xr-x 4.6 KB

README

back to top