git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: commit-graph is cool (overcoming add_missing_tags() perf issues)

From
Derrick Stolee <stolee@gmail.com>
Date
Oct 30, 2018, 14:22 UTC
Message-ID
<302a9351-6133-f562-8c5a-d688d5cc3c88@gmail.com>
In-Reply-To
<CABPp-BECpSOxudovjbDG_3W9wus102RW+E+qPmd4g3Qyd-QDKQ@mail.gmail.com>
On 10/17/2018 2:00 PM, Elijah Newren wrote:
Show 18 quoted lines
> Hi,
>
> Just wanted to give a shout-out for the commit-graph work and how
> impressive it is.  I had an internal report from a user that git
> pushes containing only one new tiny commit were taking over a minute
> (in a moderate size repo with good network connectivity). After
> digging for a while, I noticed three unusual things about the repo[1]:
>    * he had push.followTags set to true
>    * upstream repo had about 20k tags (despite only 55k commits)
>    * his repo had an additional 2.5k tags, but none of these were in
>      the history of the branches he was pushing and thus would not be
>      included in any pushes.
>
> Digging in, almost all the time was CPU-bound and spent in
> add_missing_tags()[2].  If I'm reading the code correctly, it appears
> that function loops over each tag, calling in_merge_bases_many() once
> per tag.  Thus, for his case, we were potentially walking all of
> history of the main branch 2.5k times.  That seemed rather suboptimal.
Elijah,

Do you still have this repo around? Could you by chance test the performance with the new algorithm for add_missing_tags() in [1]? Specifically, please test it without a commit-graph file, since your data shape already makes use of generation numbers pretty well.

Thanks, -Stolee

[1] https://public-inbox.org/git/pull.60.git.gitgitgadget@gmail.com/T/#t
Previous: Jeff KingNext: Elijah Newren
Message 4 of 7 in “commit-graph is cool (overcoming add_missing_tags() perf issues)”
  1. Elijah NewrenOct 17, 2018
  2. Derrick StoleeOct 17, 2018
  3. Jeff KingOct 17, 2018
  4. Derrick StoleeOct 30, 2018
  5. Elijah NewrenOct 31, 2018
  6. Ævar Arnfjörð BjarmasonOct 30, 2018
  7. Elijah NewrenOct 31, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.