Revision 5bdbaaa4e9dd901dd2907b53bbecfdf3eac9276b authored by Linus Torvalds on 15 September 2005, 22:14:29 UTC, committed by Junio C Hamano on 15 September 2005, 23:19:44 UTC
The logic to calculate the full object list used to be very inter-twined with the logic that looked up the commits. For no good reason - it's actually a lot simpler to just do that logic as a separate pass. This improves performance a bit, and uses slightly less memory in my tests, but more importantly it makes the code simpler to work with and follow what it does. The performance win is less than I had hoped for, but I get: Before: [torvalds@g5 linux]$ /usr/bin/time git-rev-list --objects v2.6.12..HEAD | wc -l 13.64user 0.42system 0:14.13elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+47947minor)pagefaults 0swaps 58945 After: [torvalds@g5 linux]$ /usr/bin/time git-rev-list --objects v2.6.12..HEAD | wc -l 11.80user 0.36system 0:12.16elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+42684minor)pagefaults 0swaps 58945 ie it improved by 2 seconds, and took a 5000+ fewer pages (hey, that's 20MB out of 174MB to go). And got the same number of objects (in theory, the more expensive one might find some more shared objects to avoid. In practice it obviously doesn't). I know how to make it use _lots_ less memory, which will probably speed it up. But that's for another time, and I'd prefer to see this go in first. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent 5098baf
File | Mode | Size |
---|---|---|
Documentation | ||
debian | ||
mozilla-sha1 | ||
ppc | ||
t | ||
templates | ||
.gitignore | -rw-r--r-- | 1.3 KB |
COPYING | -rw-r--r-- | 18.3 KB |
INSTALL | -rw-r--r-- | 2.8 KB |
Makefile | -rw-r--r-- | 9.1 KB |
README | -rw-r--r-- | 23.5 KB |
apply.c | -rw-r--r-- | 34.3 KB |
blob.c | -rw-r--r-- | 1.3 KB |
blob.h | -rw-r--r-- | 311 bytes |
cache.h | -rw-r--r-- | 11.1 KB |
cat-file.c | -rw-r--r-- | 1.1 KB |
checkout-index.c | -rw-r--r-- | 3.6 KB |
clone-pack.c | -rw-r--r-- | 4.0 KB |
cmd-rename.sh | -rwxr-xr-x | 1.5 KB |
commit-tree.c | -rw-r--r-- | 3.1 KB |
commit.c | -rw-r--r-- | 13.5 KB |
commit.h | -rw-r--r-- | 1.9 KB |
connect.c | -rw-r--r-- | 9.2 KB |
convert-objects.c | -rw-r--r-- | 7.1 KB |
count-delta.c | -rw-r--r-- | 2.2 KB |
count-delta.h | -rw-r--r-- | 196 bytes |
csum-file.c | -rw-r--r-- | 2.9 KB |
csum-file.h | -rw-r--r-- | 566 bytes |
daemon.c | -rw-r--r-- | 7.6 KB |
date.c | -rw-r--r-- | 10.2 KB |
delta.h | -rw-r--r-- | 919 bytes |
diff-delta.c | -rw-r--r-- | 7.1 KB |
diff-files.c | -rw-r--r-- | 4.1 KB |
diff-helper.c | -rw-r--r-- | 3.4 KB |
diff-index.c | -rw-r--r-- | 6.8 KB |
diff-stages.c | -rw-r--r-- | 3.5 KB |
diff-tree.c | -rw-r--r-- | 13.0 KB |
diff.c | -rw-r--r-- | 29.3 KB |
diff.h | -rw-r--r-- | 2.9 KB |
diffcore-break.c | -rw-r--r-- | 8.4 KB |
diffcore-order.c | -rw-r--r-- | 2.2 KB |
diffcore-pathspec.c | -rw-r--r-- | 1.2 KB |
diffcore-pickaxe.c | -rw-r--r-- | 2.5 KB |
diffcore-rename.c | -rw-r--r-- | 12.4 KB |
diffcore.h | -rw-r--r-- | 3.4 KB |
entry.c | -rw-r--r-- | 3.6 KB |
epoch.c | -rw-r--r-- | 16.9 KB |
epoch.h | -rw-r--r-- | 476 bytes |
export.c | -rw-r--r-- | 1.8 KB |
fetch-pack.c | -rw-r--r-- | 3.7 KB |
fetch.c | -rw-r--r-- | 4.8 KB |
fetch.h | -rw-r--r-- | 1.3 KB |
fsck-objects.c | -rw-r--r-- | 11.8 KB |
get-tar-commit-id.c | -rw-r--r-- | 514 bytes |
git-add.sh | -rwxr-xr-x | 41 bytes |
git-applymbox.sh | -rwxr-xr-x | 2.6 KB |
git-applypatch.sh | -rwxr-xr-x | 2.6 KB |
git-archimport.perl | -rwxr-xr-x | 22.8 KB |
git-bisect.sh | -rwxr-xr-x | 5.1 KB |
git-branch.sh | -rwxr-xr-x | 2.0 KB |
git-checkout.sh | -rwxr-xr-x | 1.6 KB |
git-cherry.sh | -rwxr-xr-x | 1.8 KB |
git-clone.sh | -rwxr-xr-x | 3.6 KB |
git-commit.sh | -rwxr-xr-x | 5.1 KB |
git-core.spec.in | -rw-r--r-- | 2.0 KB |
git-count-objects.sh | -rwxr-xr-x | 346 bytes |
git-cvsimport.perl | -rwxr-xr-x | 20.3 KB |
git-diff.sh | -rwxr-xr-x | 701 bytes |
git-external-diff-script | -rwxr-xr-x | 1.5 KB |
git-fetch.sh | -rwxr-xr-x | 5.5 KB |
git-format-patch.sh | -rwxr-xr-x | 5.1 KB |
git-grep.sh | -rwxr-xr-x | 653 bytes |
git-log.sh | -rwxr-xr-x | 351 bytes |
git-ls-remote.sh | -rwxr-xr-x | 1.6 KB |
git-merge-octopus.sh | -rwxr-xr-x | 1.7 KB |
git-merge-one-file.sh | -rwxr-xr-x | 1.9 KB |
git-merge-recursive.py | -rwxr-xr-x | 13.9 KB |
git-merge-resolve.sh | -rwxr-xr-x | 864 bytes |
git-merge-stupid.sh | -rwxr-xr-x | 1.4 KB |
git-merge.sh | -rwxr-xr-x | 4.5 KB |
git-octopus.sh | -rwxr-xr-x | 2.5 KB |
git-parse-remote.sh | -rwxr-xr-x | 3.1 KB |
git-prune.sh | -rwxr-xr-x | 500 bytes |
git-pull.sh | -rwxr-xr-x | 1.2 KB |
git-push.sh | -rwxr-xr-x | 967 bytes |
git-rebase.sh | -rwxr-xr-x | 1.5 KB |
git-relink.perl | -rwxr-xr-x | 4.0 KB |
git-rename.perl | -rwxr-xr-x | 1.6 KB |
git-repack.sh | -rwxr-xr-x | 1.4 KB |
git-request-pull.sh | -rwxr-xr-x | 851 bytes |
git-reset.sh | -rwxr-xr-x | 2.0 KB |
git-resolve.sh | -rwxr-xr-x | 2.3 KB |
git-revert.sh | -rwxr-xr-x | 3.8 KB |
git-send-email.perl | -rwxr-xr-x | 8.4 KB |
git-sh-setup.sh | -rwxr-xr-x | 795 bytes |
git-shortlog.perl | -rwxr-xr-x | 3.8 KB |
git-status.sh | -rwxr-xr-x | 1.5 KB |
git-tag.sh | -rwxr-xr-x | 1.5 KB |
git-verify-tag.sh | -rwxr-xr-x | 225 bytes |
git-whatchanged.sh | -rwxr-xr-x | 264 bytes |
git.sh | -rwxr-xr-x | 815 bytes |
gitMergeCommon.py | -rw-r--r-- | 6.9 KB |
gitk | -rwxr-xr-x | 95.9 KB |
hash-object.c | -rw-r--r-- | 973 bytes |
http-fetch.c | -rw-r--r-- | 8.2 KB |
ident.c | -rw-r--r-- | 3.4 KB |
index.c | -rw-r--r-- | 1.1 KB |
init-db.c | -rw-r--r-- | 5.9 KB |
local-fetch.c | -rw-r--r-- | 5.4 KB |
ls-files.c | -rw-r--r-- | 14.2 KB |
ls-tree.c | -rw-r--r-- | 5.6 KB |
mailinfo.c | -rw-r--r-- | 14.9 KB |
mailsplit.c | -rw-r--r-- | 2.5 KB |
merge-base.c | -rw-r--r-- | 4.0 KB |
merge-index.c | -rw-r--r-- | 2.6 KB |
mktag.c | -rw-r--r-- | 3.2 KB |
object.c | -rw-r--r-- | 4.7 KB |
object.h | -rw-r--r-- | 1.3 KB |
pack-check.c | -rw-r--r-- | 3.7 KB |
pack-objects.c | -rw-r--r-- | 11.4 KB |
pack.h | -rw-r--r-- | 618 bytes |
patch-delta.c | -rw-r--r-- | 1.7 KB |
patch-id.c | -rw-r--r-- | 1.4 KB |
path.c | -rw-r--r-- | 1.8 KB |
peek-remote.c | -rw-r--r-- | 970 bytes |
pkt-line.c | -rw-r--r-- | 2.5 KB |
pkt-line.h | -rw-r--r-- | 270 bytes |
prune-packed.c | -rw-r--r-- | 1.4 KB |
quote.c | -rw-r--r-- | 825 bytes |
quote.h | -rw-r--r-- | 752 bytes |
read-cache.c | -rw-r--r-- | 12.0 KB |
read-tree.c | -rw-r--r-- | 14.9 KB |
receive-pack.c | -rw-r--r-- | 6.3 KB |
refs.c | -rw-r--r-- | 5.5 KB |
refs.h | -rw-r--r-- | 1.0 KB |
rev-list.c | -rw-r--r-- | 13.4 KB |
rev-parse.c | -rw-r--r-- | 4.2 KB |
rev-tree.c | -rw-r--r-- | 3.1 KB |
rsh.c | -rw-r--r-- | 2.8 KB |
rsh.h | -rw-r--r-- | 159 bytes |
run-command.c | -rw-r--r-- | 1.2 KB |
run-command.h | -rw-r--r-- | 360 bytes |
send-pack.c | -rw-r--r-- | 7.0 KB |
server-info.c | -rw-r--r-- | 11.5 KB |
setup.c | -rw-r--r-- | 2.4 KB |
sha1_file.c | -rw-r--r-- | 34.0 KB |
sha1_name.c | -rw-r--r-- | 5.3 KB |
show-branch.c | -rw-r--r-- | 11.4 KB |
show-index.c | -rw-r--r-- | 593 bytes |
ssh-fetch.c | -rw-r--r-- | 2.8 KB |
ssh-pull.c | -rw-r--r-- | 154 bytes |
ssh-push.c | -rw-r--r-- | 155 bytes |
ssh-upload.c | -rw-r--r-- | 2.8 KB |
strbuf.c | -rw-r--r-- | 807 bytes |
strbuf.h | -rw-r--r-- | 216 bytes |
stripspace.c | -rw-r--r-- | 786 bytes |
tag.c | -rw-r--r-- | 2.3 KB |
tag.h | -rw-r--r-- | 452 bytes |
tar-tree.c | -rw-r--r-- | 10.7 KB |
test-date.c | -rw-r--r-- | 343 bytes |
test-delta.c | -rw-r--r-- | 1.8 KB |
tree.c | -rw-r--r-- | 5.5 KB |
tree.h | -rw-r--r-- | 790 bytes |
unpack-file.c | -rw-r--r-- | 684 bytes |
unpack-objects.c | -rw-r--r-- | 6.7 KB |
update-index.c | -rw-r--r-- | 9.2 KB |
update-server-info.c | -rw-r--r-- | 432 bytes |
upload-pack.c | -rw-r--r-- | 3.9 KB |
usage.c | -rw-r--r-- | 625 bytes |
var.c | -rw-r--r-- | 1.1 KB |
verify-pack.c | -rw-r--r-- | 1.1 KB |
write-tree.c | -rw-r--r-- | 3.8 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...