summaryrefslogtreecommitdiff
path: root/templates/hooks--commit-msg.sample
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2020-03-30 00:31:29 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-03-30 09:59:53 -0700
commitd21ee7d111073dfd7a86f6fe870d0c1ec6a07126 (patch)
treeb0cc5b3a6bdd0ac55c39387d470290cdcf7cb70e /templates/hooks--commit-msg.sample
parentcommit-graph: compute Bloom filters for changed paths (diff)
downloadtgif-d21ee7d111073dfd7a86f6fe870d0c1ec6a07126.tar.xz
commit-graph: examine changed-path objects in pack order
Looking at the diff of commit objects in pack order is much faster than in sha1 order, as it gives locality to the access of tree deltas (whereas sha1 order is effectively random). Unfortunately the commit-graph code sorts the commits (several times, sometimes as an oid and sometimes a pointer-to-commit), and we ultimately traverse in sha1 order. Instead, let's remember the position at which we see each commit, and traverse in that order when looking at bloom filters. This drops my time for "git commit-graph write --changed-paths" in linux.git from ~4 minutes to ~1.5 minutes. Probably the "--reachable" code path would want something similar. Or alternatively, we could use a different data structure (either a hash, or maybe even just a bit in "struct commit") to keep track of which oids we've seen, etc instead of sorting. And then we could keep the original order. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Garima Singh <garima.singh@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'templates/hooks--commit-msg.sample')
0 files changed, 0 insertions, 0 deletions