summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authorAlexandre Julliard <julliard@winehq.org>2006-07-23 17:51:04 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-07-24 06:44:00 (GMT)
commitf8263c5339fd70ee00b60c37b715c7e46b30a3bf (patch)
treebf9bd85b7cc1910f54d1c9d08ef574d64fd125f7 /dir.c
parent4812a93a8c0ad25ee701da8ff46a3c5d62994224 (diff)
downloadgit-f8263c5339fd70ee00b60c37b715c7e46b30a3bf.zip
git-f8263c5339fd70ee00b60c37b715c7e46b30a3bf.tar.gz
git-f8263c5339fd70ee00b60c37b715c7e46b30a3bf.tar.bz2
show-branch: Fix another performance problem.
When naming commits, stop walking the parent chain as soon as we find a commit that already has a name. The parent chain of that commit will be walked later on in any case (or may even have been walked already). This avoids O(n^2) behavior; on a tree where show-branch displays 6800 commits, the total run time drops from 77 seconds to 5 seconds. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'dir.c')
0 files changed, 0 insertions, 0 deletions