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

Re: RFC: Flat directory for notes, or fan-out? Both!

From
Boyd Stephen Smith Jr. <bss@iguanasuicide.net>
Date
Feb 11, 2009, 01:58 UTC
Message-ID
<200902101958.21284.bss@iguanasuicide.net>
In-Reply-To
<20090210131600.GD17305@coredump.intra.peff.net>
On Tuesday 10 February 2009 07:16:00 you wrote:
Show 11 quoted lines
> On Tue, Feb 10, 2009 at 01:58:41AM -0600, Boyd Stephen Smith Jr. wrote:
> > On Monday 09 February 2009 15:12:06 Johannes Schindelin wrote:
> > > So I think it would be a sane plan to do the following when a commit
> > > note is requested:
> >
> > So, something like a Trie data structure?  I think that is a great way to
> > store fixed-length strings from a limited alphabet with arbitrary data
> > attached.
>
> I don't think a Trie quite makes sense here. We still have to look
> linearly through each git tree (an artifact of the tree implementation).

Perhaps it's not a traditional trie structure but that was the closest analogy I could come up with. I was actually thinking of something between a trie and a b-tree, I think. (It has been a long time since data structures class...)

The issue, as I understand it, it that we don't have gargantuan tree objects. Reading and writing are slow and they'd also take up way to much memory if you are only trying to find a few commits.

So, we figure out a maximum tree size that is reasonable, figure out a fan-out that prevents the tree from growing above that size, but *dynamically* apply that fan-out. I.e. if the fanout is 2 characters, and we've added notes for both ff82730c and ff23abc0, then our tree would have ff/ -> some_tree_sha, but if we had only a note for the one one our tree would have ff82730c... -> some_note_sha. Unlike .git/objects, we should probably also do dynamic fanout in subtrees.

Yes, this would require a custom merge strategy for notes to flatten -> merge -> canonicalize.

> Or did you mean something else entirely?
Yeah, that.

While I'm throwing out crazy ideas, why not makes a notes tree look just like .git/objects, including info and pack directories?

-- 
Boyd Stephen Smith Jr.                   ,= ,-_-. =.
bss@iguanasuicide.net                   ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy         `-'(. .)`-'
http://iguanasuicide.net/                    \_/
Previous: Jeff KingNext: Linus Torvalds
Message 4 of 33 in “RFC: Flat directory for notes, or fan-out? Both!”
  1. Johannes SchindelinFeb 9, 2009
  2. Boyd Stephen Smith Jr.Feb 10, 2009
  3. Jeff KingFeb 10, 2009
  4. Boyd Stephen Smith Jr.Feb 11, 2009
  5. Linus TorvaldsFeb 11, 2009
  6. Sam VilainFeb 11, 2009
  7. Linus TorvaldsFeb 11, 2009
  8. Sam VilainFeb 11, 2009
  9. Johannes SchindelinFeb 11, 2009
  10. Jeff KingFeb 10, 2009
  11. Johannes SchindelinFeb 10, 2009
  12. Jeff KingFeb 10, 2009
  13. Johannes SchindelinFeb 10, 2009
  14. Junio C HamanoFeb 10, 2009
  15. Shawn O. PearceFeb 10, 2009
  16. Johannes SchindelinFeb 10, 2009
  17. Shawn O. PearceFeb 10, 2009
  18. Johannes SchindelinFeb 10, 2009
  19. Junio C HamanoFeb 10, 2009
  20. Shawn O. PearceFeb 10, 2009
  21. Johannes SchindelinFeb 10, 2009
  22. Thomas RastFeb 10, 2009
  23. Thomas RastFeb 10, 2009
  24. Junio C HamanoFeb 10, 2009
  25. Jeff KingFeb 11, 2009
  26. Johannes SchindelinFeb 11, 2009
  27. Junio C HamanoFeb 11, 2009
  28. Johannes SchindelinFeb 11, 2009
  29. Shawn O. PearceFeb 10, 2009
  30. Johannes SchindelinFeb 10, 2009
  31. Shawn O. PearceFeb 10, 2009
  32. Sam VilainFeb 11, 2009
  33. Sam VilainFeb 11, 2009

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.