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

Re: Change set based shallow clone

From
Llinux@horizon.com <linux@horizon.com>
Date
Sep 10, 2006, 15:21 UTC
Message-ID
<20060910152122.31694.qmail@science.horizon.com>
In-Reply-To
<e5bfff550609092214t4f8e195eib28e302f4d284aa@mail.gmail.com>

This conversation is going in so many directions at once that it's getting annoying.

The first level decision requires input from the point of view of gitk and qgit internals as to what's easy to implement.

I'm trying to figure out the gitk code, but I'm not fluent in tcl, and it has 39 non-boilerplate comment lines in 229 functions and 6308 lines of source, so it requires fairly intensive grokking.

Still, while it obviously doesn't render bitmaps until the data appears in the window, it appears as though at least part of the layout (the "layoutmore" function) code is performed eagerly as soon as new data arrives via the getcommitlines callback.

(Indeed, it appears that Tk does not inform it of window scroll events, so it can't wait any longer to decide on the layout.)

Case 1: The visualizer is NOT CAPABLE of accepting out-of-order
	input.  Without very sophisticated cacheing in git-rev-list,
	it must process all of the data before outputting any in
	order to make an absolute guarantee of no out-of-order data
	despite possibly messed-up timestamps.
	It is possible to notice that the date-first traversal only
	has one active chain and flush the queued data at that point,
	but that situation is unlikely to arise in repositories of
	non-trivial size, which are exactly the ones for which
	the batch-sorting delay is annoying.
Case 2: The visualizer IS CAPABLE of accepting out-of-order input.
	Regardless of whether the layout is done eagerly or lazily,
	this requires the visualizer to potentially undo part of
	its layout and re-do it, so has a UI implementation cost.
	The re-doing does not need to be highly efficient; any number
	of heuristics and exception caches can reduce the occurrence of
	this in git-rev-list output to very low levels.  It's just
	absolutely excluding it, without losing incremental output,
	that is difficult.
	Heuristic: I suspect the most common wrong-timestamp case is
	a time zone misconfiguration, so holding back output until the
	tree traversal has advanced 24 hours will eliminate most of the
	problems.  Atypically large time jumps (like more than a year)
	could also trigger special "gross clock error" handling.
	Cache: whenever a child timestamped older than an ancestor is
	encountered, this can be entered in a persistent cache that can
	be used to give the child a different sorting priority next time.
	The simplest implementation would propagate this information up a
	chain of bad timestamps by one commit per git-rev-list invocation,
	but even that's probably okay.
	(A study of timestamp ordering problems in existing repositories
	would be helpful for tuning these.)

In case 2, I utterly fail to see how delaying emitting the out-of-order commit is of the slightest help to the UI. The simplest way to merge out-of-order data is with an insertion sort (a.k.a. roll back and reprocess forward), and the cost of that is minimized if the distance to back up is minimized.

Some "oops!" annotation on the git-rev-list output may be helpful to tell the UI that it needs to search back, but it already has an internal index of commits, so perhaps even that isn't worth bothering with. Fancier output formats are also more work to process.

With sufficient cacheing of exceptions in git-rev-list, it may be practical to just have a single "oops, I screwed up; let's start again" output line, which very rarely triggers.

But can we stop designing git-rev-list output formats until we've figured out if and how to implement it in the visualizer? Or, more to the point, visualizers plural. That's the hard part. Then we can see what sort of git-rev-list output would be most convenient.

For example, is fixing a small number of out-of-place commits practical, or is it better to purge and restart? The former avoids deleting already-existing objects, while the latter avoids moving them.

The original problem is that the long delay between starting a git history browser and being able to browse them is annoying. The visualizer UIs already support browsing while history is flowing in from git-rev-list, but git-rev-list is reading and sorting the entire history before outputting the first line.

Previous: Junio C HamanoNext: Marco Costalba
Message 94 of 99 in “Change set based shallow clone”
  1. Jon SmirlSep 7, 2006
  2. Jakub NarebskiSep 7, 2006
  3. Jon SmirlSep 7, 2006
  4. Jeff KingSep 7, 2006
  5. Jakub NarebskiSep 7, 2006
  6. Jakub NarebskiSep 7, 2006
  7. Junio C HamanoSep 7, 2006
  8. Jon SmirlSep 7, 2006
  9. Anand KumriaSep 10, 2006
  10. Andreas EricssonSep 8, 2006
  11. Junio C HamanoSep 7, 2006
  12. Jakub NarebskiSep 7, 2006
  13. Martin LanghoffSep 8, 2006
  14. Junio C HamanoSep 8, 2006
  15. Martin LanghoffSep 8, 2006
  16. Junio C HamanoSep 8, 2006
  17. A Large Angry SCMSep 8, 2006
  18. Jon SmirlSep 8, 2006
  19. Jakub NarebskiSep 8, 2006
  20. Petr BaudisSep 9, 2006
  21. Jakub NarebskiSep 9, 2006
  22. Aneesh Kumar K.VSep 8, 2006
  23. linux@horizon.comSep 8, 2006
  24. Jon SmirlSep 8, 2006
  25. Jakub NarebskiSep 8, 2006
  26. Junio C HamanoSep 8, 2006
  27. linux@horizon.comSep 8, 2006
  28. Jon SmirlSep 8, 2006
  29. Jakub NarebskiSep 8, 2006
  30. Linus TorvaldsSep 8, 2006
  31. Jon SmirlSep 8, 2006
  32. Paul MackerrasSep 8, 2006
  33. Jon SmirlSep 9, 2006
  34. Paul MackerrasSep 10, 2006
  35. Jon SmirlSep 10, 2006
  36. linux@horizon.comSep 10, 2006
  37. Jon SmirlSep 10, 2006
  38. linux@horizon.comSep 10, 2006
  39. Linus TorvaldsSep 10, 2006
  40. Jon SmirlSep 10, 2006
  41. Linus TorvaldsSep 11, 2006
  42. Paul MackerrasSep 10, 2006
  43. Linus TorvaldsSep 11, 2006
  44. Linus TorvaldsSep 11, 2006
  45. Junio C HamanoSep 11, 2006
  46. Junio C HamanoSep 11, 2006
  47. Paul MackerrasSep 11, 2006
  48. linux@horizon.comSep 11, 2006
  49. Jon SmirlSep 11, 2006
  50. Junio C HamanoSep 11, 2006
  51. Paul MackerrasSep 11, 2006
  52. Junio C HamanoSep 11, 2006
  53. Jakub NarebskiSep 12, 2006
  54. Junio C HamanoSep 12, 2006
  55. Jakub NarebskiSep 12, 2006
  56. Jakub NarebskiSep 11, 2006
  57. Junio C HamanoSep 10, 2006
  58. Shawn PearceSep 11, 2006
  59. Junio C HamanoSep 11, 2006
  60. Shawn PearceSep 11, 2006
  61. Junio C HamanoSep 11, 2006
  62. Jakub NarebskiSep 11, 2006
  63. Shawn PearceSep 11, 2006
  64. Junio C HamanoSep 11, 2006
  65. Shawn PearceSep 11, 2006
  66. Junio C HamanoSep 11, 2006
  67. Shawn PearceSep 11, 2006
  68. Jon SmirlSep 11, 2006
  69. Paul MackerrasSep 9, 2006
  70. Linus TorvaldsSep 9, 2006
  71. Junio C HamanoSep 9, 2006
  72. Paul MackerrasSep 9, 2006
  73. Linus TorvaldsSep 9, 2006
  74. Marco CostalbaSep 9, 2006
  75. Linus TorvaldsSep 9, 2006
  76. Marco CostalbaSep 9, 2006
  77. linux@horizon.comSep 9, 2006
  78. Marco CostalbaSep 9, 2006
  79. Linus TorvaldsSep 9, 2006
  80. Jeff KingSep 9, 2006
  81. Junio C HamanoSep 9, 2006
  82. Jeff KingSep 9, 2006
  83. Linus TorvaldsSep 9, 2006
  84. Jon SmirlSep 9, 2006
  85. Linus TorvaldsSep 10, 2006
  86. Junio C HamanoSep 10, 2006
  87. Marco CostalbaSep 10, 2006
  88. Junio C HamanoSep 10, 2006
  89. Marco CostalbaSep 10, 2006
  90. Marco CostalbaSep 10, 2006
  91. Junio C HamanoSep 10, 2006
  92. Marco CostalbaSep 10, 2006
  93. Junio C HamanoSep 10, 2006
  94. linux@horizon.comSep 10, 2006
  95. Marco CostalbaSep 10, 2006
  96. Paul MackerrasSep 11, 2006
  97. linux@horizon.comSep 11, 2006
  98. Jakub NarebskiSep 10, 2006
  99. Josef WeidendorferSep 10, 2006

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.