diff options
author | Jeff King <peff@peff.net> | 2020-03-30 00:31:29 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-03-30 09:59:53 -0700 |
commit | d21ee7d111073dfd7a86f6fe870d0c1ec6a07126 (patch) | |
tree | b0cc5b3a6bdd0ac55c39387d470290cdcf7cb70e /Documentation/git-verify-commit.txt | |
parent | commit-graph: compute Bloom filters for changed paths (diff) | |
download | tgif-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 'Documentation/git-verify-commit.txt')
0 files changed, 0 insertions, 0 deletions