summaryrefslogtreecommitdiff
path: root/archive.c
diff options
context:
space:
mode:
authorDerrick Stolee <dstolee@microsoft.com>2018-02-24 20:34:56 -0500
committerJunio C Hamano <gitster@pobox.com>2018-02-27 15:04:52 -0800
commitebbed3ba04ce8e3cd9dff0e86717fb7e3d42db37 (patch)
tree4e00828b22c4dc732f40dc8e08cada45c9c45b84 /archive.c
parent9752ad0bb79f680bca48db7adc45338b298304b0 (diff)
downloadgit-ds/mark-parents-uninteresting-optim.tar.gz
revision.c: reduce object database queriesds/mark-parents-uninteresting-optim
In mark_parents_uninteresting(), we check for the existence of an object file to see if we should treat a commit as parsed. The result is to set the "parsed" bit on the commit. Modify the condition to only check has_object_file() if the result would change the parsed bit. When a local branch is different from its upstream ref, "git status" will compute ahead/behind counts. This uses paint_down_to_common() and hits mark_parents_uninteresting(). On a copy of the Linux repo with a local instance of "master" behind the remote branch "origin/master" by ~60,000 commits, we find the performance of "git status" went from 1.42 seconds to 1.32 seconds, for a relative difference of -7.0%. Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'archive.c')
0 files changed, 0 insertions, 0 deletions