aboutsummaryrefslogtreecommitdiff
path: root/git-merge.sh
diff options
context:
space:
mode:
authorSergey Vlasov <vsu@altlinux.ru>2005-09-21 20:33:59 +0400
committerJunio C Hamano <junkio@cox.net>2005-09-22 21:52:11 -0700
commita82d07e5e61a9aef38d70277a5b27588a939c5ce (patch)
treee5889236884834bf63bd9124f537bae5f7f1d0ae /git-merge.sh
parent80077f071614ef1775472eb54d59c071e15d5784 (diff)
downloadgit-a82d07e5e61a9aef38d70277a5b27588a939c5ce.tar.gz
git-a82d07e5e61a9aef38d70277a5b27588a939c5ce.tar.xz
[PATCH] fetch.c: Make process() look at each object only once
The process() function is very often called multiple times for the same object (because lots of trees refer to the same blobs), but did not have a fast check for this, therefore a lot of useless calls to has_sha1_file() and parse_object() were made before discovering that nothing needs to be done. This patch adds the SEEN flag which is used in process() to make it look at each object only once. When testing git-local-fetch on the repository of GIT, this gives a 14x improvement in CPU usage (mainly because the redundant calls to parse_object() are now avoided - parse_object() always unpacks and parses the object data, even if it was already parsed before). Signed-off-by: Sergey Vlasov <vsu@altlinux.ru> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-merge.sh')
0 files changed, 0 insertions, 0 deletions