All of lore.kernel.org
 help / color / mirror / Atom feed
* RFC: Flat directory for notes, or fan-out?  Both!
@ 2009-02-09 21:12 Johannes Schindelin
  2009-02-10  7:58 ` Boyd Stephen Smith Jr.
                   ` (2 more replies)
  0 siblings, 3 replies; 33+ messages in thread
From: Johannes Schindelin @ 2009-02-09 21:12 UTC (permalink / raw)
  To: git, peff, spearce

Hi,

Shawn triggered some well needed thinking on my part about the notes 
implementation.  At the moment, we have flat directory structure, and read 
all of them in one go (when needed).

I think we should support that, because it is relatively easy to generate 
that kind of trees for small-scale applications.

However, I think there is also a benefit to handle fan-out directory 
structures, too: they scale much nicer.

If the commit name was not found as a filename, it could be searched in 
whatever subdirectory whose name is a prefix of said commit name (first 
wins).

So I think it would be a sane plan to do the following when a commit note 
is requested:

- If not done yet, read in the whole top-level directory of the notes ref.

- If the commit name is not found, find the tree entries whose name is a 
  prefix of the commit name (we can even use the same hashmap to store 
  these "incomplete" names, as we use a linear hash, which we fill in 
  ascending order),

  - read the trees one by one, until the commit name is found (or no tree 
    entry is left), deleting the trees from the hashmap on the go.

How does that sound?

Ciao,
Dscho

	

^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2009-02-11 23:06 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-09 21:12 RFC: Flat directory for notes, or fan-out? Both! Johannes Schindelin
2009-02-10  7:58 ` Boyd Stephen Smith Jr.
2009-02-10 13:16   ` Jeff King
2009-02-11  1:58     ` Boyd Stephen Smith Jr.
2009-02-11  2:35       ` Linus Torvalds
2009-02-11  3:30         ` Sam Vilain
2009-02-11  3:54           ` Linus Torvalds
2009-02-11  5:05             ` Sam Vilain
2009-02-11 12:35               ` Johannes Schindelin
2009-02-10 12:18 ` Jeff King
2009-02-10 12:59   ` Johannes Schindelin
2009-02-10 13:10     ` Jeff King
2009-02-10 13:32       ` Johannes Schindelin
2009-02-10 15:58         ` Junio C Hamano
2009-02-10 16:48           ` Shawn O. Pearce
2009-02-10 16:48           ` Johannes Schindelin
2009-02-10 16:56             ` Shawn O. Pearce
2009-02-10 17:31               ` Johannes Schindelin
2009-02-10 18:35               ` Junio C Hamano
2009-02-10 19:09                 ` Shawn O. Pearce
2009-02-10 21:10                 ` Johannes Schindelin
2009-02-10 22:16                   ` Thomas Rast
2009-02-10 22:26                     ` Thomas Rast
2009-02-10 22:32                     ` Junio C Hamano
2009-02-11 20:02                   ` Jeff King
2009-02-11 20:57                     ` Johannes Schindelin
2009-02-11 21:16                       ` Junio C Hamano
2009-02-11 23:05                         ` Johannes Schindelin
2009-02-10 16:44         ` Shawn O. Pearce
2009-02-10 17:09           ` Johannes Schindelin
2009-02-10 17:17             ` Shawn O. Pearce
2009-02-11  3:19           ` Sam Vilain
2009-02-11  1:14 ` Sam Vilain

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.