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

Re: [PATCH 0/3] Make add_missing_tags() linear

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 31, 2018, 03:05 UTC
Message-ID
<xmqq7ehyzugy.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<pull.60.git.gitgitgadget@gmail.com>
"Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 6 quoted lines
> Add a new method in commit-reach.c called get_reachable_subset() which does
> a many-to-many reachability test. Starting at the 'from' commits, walk until
> the generation is below the smallest generation in the 'to' commits, or all
> 'to' commits have been discovered. This performs only one commit walk for
> the entire add_missing_tags() method, giving linear performance in the worst
> case.
;-)

I think in_merge_bases_many() was an attempt to do one half of this (i.e. it checks only one 'to' against main 'from' to see if any of them reach). I wonder why we didn't extend it to multiple 'to' back when we invented it.

In any case, good to see this code optimized.
Thanks.
Previous: Derrick Stolee via GitGitGadgetNext: Elijah Newren
Message 10 of 22 in “Make add_missing_tags() linear”
  1. 0/3 Make add_missing_tags() linearDerrick Stolee via GitGitGadget, Oct 30, 2018
  2. 1/3 commit-reach: implement get_reachable_subsetDerrick Stolee via GitGitGadget, Oct 30, 2018
  3. Junio C HamanoOct 31, 2018
  4. Derrick StoleeOct 31, 2018
  5. Junio C HamanoNov 2, 2018
  6. Elijah NewrenOct 31, 2018
  7. Derrick StoleeOct 31, 2018
  8. 2/3 test-reach: test get_reachable_subsetDerrick Stolee via GitGitGadget, Oct 30, 2018
  9. 3/3 remote: make add_missing_tags() linearDerrick Stolee via GitGitGadget, Oct 30, 2018
  10. Junio C HamanoOct 31, 2018
  11. Elijah NewrenOct 31, 2018
  12. Derrick StoleeOct 31, 2018
  13. Elijah NewrenNov 1, 2018
  14. Derrick StoleeNov 1, 2018
  15. Elijah NewrenNov 1, 2018
  16. Derrick StoleeNov 1, 2018
  17. Elijah NewrenNov 2, 2018
  18. Derrick StoleeNov 2, 2018
  19. 0/3 Make add_missing_tags() linearDerrick Stolee via GitGitGadget, Nov 2, 2018
  20. 1/3 commit-reach: implement get_reachable_subsetDerrick Stolee via GitGitGadget, Nov 2, 2018
  21. 2/3 test-reach: test get_reachable_subsetDerrick Stolee via GitGitGadget, Nov 2, 2018
  22. 3/3 remote: make add_missing_tags() linearDerrick Stolee via GitGitGadget, Nov 2, 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.