git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/1] [PERF BUG] Fix size_mult option in fetch.writeCommitGraph
@ 2020-01-02 16:14 Derrick Stolee via GitGitGadget
  2020-01-02 16:14 ` [PATCH 1/1] fetch: set size_multiple in split_commit_graph_opts Derrick Stolee via GitGitGadget
  0 siblings, 1 reply; 6+ messages in thread
From: Derrick Stolee via GitGitGadget @ 2020-01-02 16:14 UTC (permalink / raw)
  To: git; +Cc: peff, me, szeder.dev, Derrick Stolee, Junio C Hamano

I found this while doing some digging into fetch behavior and split commit
graphs. I had been running fetch.writeCommitGraph=true on my local repos for
a while and noticed that the commit-graph chains were much longer than
expected.

The reason is silly, and the commit message includes all the details.

This behavior exists since v2.24.0, so I'm not sure if it makes the bar for
v2.25.0 this late in the release cycle. At minimum, the change is very small
and unlikely to cause more pain.

This is only a performance bug, and the effect is relatively small. A large
list of commit-graph files slows down the commit lookup time as we need to
perform a linear number of binary searches. This only affects finding the
first commit(s) in a commit walk, as after that we can navigate quickly to
the correct position using graph_pos. When a user runs gc (with 
gc.writeCommitGraph=true, on by default), the chain collapses to a single
level, fixing the performance problem.

Thanks, -Stolee

Derrick Stolee (1):
  fetch: set size_multiple in split_commit_graph_opts

 builtin/fetch.c | 4 +---
 commit-graph.c  | 4 +++-
 2 files changed, 4 insertions(+), 4 deletions(-)


base-commit: 99c33bed562b41de6ce9bd3fd561303d39645048
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-509%2Fderrickstolee%2Ffetch-write-commit-graph-split-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-509/derrickstolee/fetch-write-commit-graph-split-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/509
-- 
gitgitgadget

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-01-06 19:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-02 16:14 [PATCH 0/1] [PERF BUG] Fix size_mult option in fetch.writeCommitGraph Derrick Stolee via GitGitGadget
2020-01-02 16:14 ` [PATCH 1/1] fetch: set size_multiple in split_commit_graph_opts Derrick Stolee via GitGitGadget
2020-01-02 16:20   ` Derrick Stolee
2020-01-02 21:49   ` Junio C Hamano
2020-01-03 13:07     ` Derrick Stolee
2020-01-06 19:39   ` Jeff King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).