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

Re: [PATCH 0/4] Speed up git tag --contains

From
Clemens Buchacher <drizzd@aon.at>
Date
Jul 6, 2011, 19:06 UTC
Message-ID
<20110706190621.GA3937@toss>
In-Reply-To
<20110706065452.GB927@sigill.intra.peff.net>
On Wed, Jul 06, 2011 at 02:54:52AM -0400, Jeff King wrote:
Show 7 quoted lines
>
> From what we've seen, it seems like skewing into the past is more
> common. It seems to come from importing old commits and using their
> timestamps as the commit timestamps. It would be nice to find a more
> accurate set (I _think_ with future skew like the second example above,
> the patch below will not give wrong answers; it will just be overly
> pessimal and traverse more commits than it needs to).

Yes, and that was indeed my only concern. Since we cannot tell with certainty if we have skew into the past or into the future, it's not wrong to always assume skew into the past. It just does not always produce the shortest run of skewed commits, as you said. And if skews into the future are rare, then that should not be an issue.

But considering the complexity behind the timestamp based approach, which you have demonstrated in your analysis, the generation number concept looks very attractive to me.

It even has potential for the push/pull transport protocol. (Unreliable) commit timestamps are currently used while searching for common commits. And there is still the problem of searching down the wrong branch, which can be especially bad for repos with multiple disjoint histories. For example, we shouldn't send any HAVEs for commits with generation numbers greater than the generation number of the wanted ref. Or smaller than half that (in which case downloading the complete pack would probably be faster).

Thomas, IIRC you were working on this. Do you think this could help?

Clemens
Previous: Jeff KingNext: Jonathan Nieder
Message 8 of 28 in “Speed up git tag --contains”
  1. 0/4 Speed up git tag --containsÆvar Arnfjörð Bjarmason, Jun 11, 2011
  2. 1/4 tag: speed up --contains calculationÆvar Arnfjörð Bjarmason, Jun 11, 2011
  3. 2/4 limit "contains" traversals based on commit timestampÆvar Arnfjörð Bjarmason, Jun 11, 2011
  4. 3/4 default core.clockskew variable to one dayÆvar Arnfjörð Bjarmason, Jun 11, 2011
  5. 4/4 Why is "git tag --contains" so slow?Ævar Arnfjörð Bjarmason, Jun 11, 2011
  6. Jeff KingJul 6, 2011
  7. Jeff KingJul 6, 2011
  8. Clemens BuchacherJul 6, 2011
  9. Jonathan NiederJul 6, 2011
  10. Jeff KingJul 6, 2011
  11. Jakub NarebskiJul 6, 2011
  12. Ted Ts'oJul 6, 2011
  13. Jeff KingJul 6, 2011
  14. Jakub NarebskiJul 6, 2011
  15. Jeff KingJul 7, 2011
  16. Junio C HamanoJul 7, 2011
  17. Jakub NarebskiJul 7, 2011
  18. A Large Angry SCMJul 7, 2011
  19. Junio C HamanoJul 8, 2011
  20. Jeff KingJul 8, 2011
  21. Junio C HamanoJul 6, 2011
  22. Jeff KingJul 7, 2011
  23. Jakub NarebskiJul 7, 2011
  24. csilversJan 12, 2018
  25. Jeff KingMar 3, 2018
  26. csilversMar 8, 2018
  27. Derrick StoleeMar 12, 2018
  28. Jeff KingMar 12, 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.