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

Re: Revision walking, commit dates, slop

From
Derrick Stolee <stolee@gmail.com>
Date
May 20, 2019, 01:33 UTC
Message-ID
<f14799c3-e343-eb41-3536-65de7e38fbd9@gmail.com>
In-Reply-To
<20190518041706.ct6ie5trvxgdhjar@glandium.org>
On 5/18/2019 12:17 AM, Mike Hommey wrote:
Show 23 quoted lines
> On Sat, May 18, 2019 at 12:58:28PM +0900, Mike Hommey wrote:
>> On Sat, May 18, 2019 at 03:50:05AM +0200, SZEDER Gábor wrote:
>>>
>>> All the above is without commit-graph, I presume?  If so, then you
>>> should give it a try, as it might bring immediate help in your
>>> pathological repo.  With 5k commit in the same second (enforced via
>>> 'export GIT_COMMITTER_DATE=$(date); for i in {1..5000} ...') I get:
>>>
>>>   $ best-of-five -q git rev-list HEAD~..HEAD
>>>   0.069
>>>   $ git commit-graph write --reachableComputing commit graph generation
>>>   numbers: 100% (5000/5000), done.
>>>   $ best-of-five -q git rev-list HEAD~..HEAD
>>>   0.004
>>
>> I'm not observing any difference from using commit-graph, whether in
>> time or in the number of commits that are looked at in limit_list().
> 
> -c core.commitGraph=true does make a difference in time, but not in the
> number of commits looked at in limit_list(). So it's only faster because
> each iteration of the loop is faster. It means it's still dependent on
> the depth of the dag, and the larger the repo will grow, the slower it
> will get.

The plan is to use the commit-graph's generation numbers for these A..B queries, but due to some cases when commit date is a _better_ heuristic than generation numbers, we have not enabled them for A..B. You'll see that 'git rev-list --topo-order -n 1 HEAD` will be much faster with the commit-graph, but adding '--topo-order' to your 'HEAD~1..HEAD' query should not change the time at all.

See [1] for the discussion about "generation number v2" which will allow us to use a better heuristic in these cases.

Thanks, -Stolee

[1] https://public-inbox.org/git/6367e30a-1b3a-4fe9-611b-d931f51effef@gmail.com/
Previous: Jakub NarebskiNext: Jakub Narebski
Message 7 of 23 in “Revision walking, commit dates, slop”
  1. Mike HommeyMay 18, 2019
  2. SZEDER GáborMay 18, 2019
  3. Mike HommeyMay 18, 2019
  4. Mike HommeyMay 18, 2019
  5. SZEDER GáborMay 18, 2019
  6. Jakub NarebskiMay 19, 2019
  7. Derrick StoleeMay 20, 2019
  8. Jakub NarebskiMay 20, 2019
  9. Derrick StoleeMay 20, 2019
  10. Jakub NarebskiMay 20, 2019
  11. Jakub NarebskiMay 20, 2019
  12. Derrick StoleeMay 21, 2019
  13. Jakub NarebskiMay 22, 2019
  14. Derrick StoleeMay 22, 2019
  15. Jakub NarebskiMay 23, 2019
  16. Jakub NarebskiJun 25, 2019
  17. Derrick StoleeJun 25, 2019
  18. commit-graph: generation v5 (backward compatible date ceiling)Jakub Narebski, Sep 18, 2019
  19. Derrick StoleeSep 18, 2019
  20. revision: use generation for A..B --topo-order queriesDerrick Stolee, May 21, 2019
  21. 2/2 revision: keep topo-walk free of unintersting commitsDerrick Stolee, May 21, 2019
  22. Mike HommeyMay 22, 2019
  23. Jonathan NiederMay 21, 2019

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.