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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Johannes Schindelin
Date: Monday, February 9, 2009 - 2:12 pm

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

	
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
RFC: Flat directory for notes, or fan-out? Both!, Johannes Schindelin, (Mon Feb 9, 2:12 pm)
Re: [PATCH] git-rebase-interactive: you can also add new c ..., Johannes Schindelin, (Mon Feb 9, 2:31 pm)
Re: [PATCH] git-rebase-interactive: you can also add new c ..., Johannes Schindelin, (Mon Feb 9, 3:26 pm)
Re: RFC: Flat directory for notes, or fan-out? Both!, Boyd Stephen Smith Jr., (Tue Feb 10, 12:58 am)
Re: RFC: Flat directory for notes, or fan-out? Both!, Johannes Schindelin, (Tue Feb 10, 5:59 am)
Re: RFC: Flat directory for notes, or fan-out? Both!, Johannes Schindelin, (Tue Feb 10, 6:32 am)
Re: RFC: Flat directory for notes, or fan-out? Both!, Shawn O. Pearce, (Tue Feb 10, 9:44 am)
Re: RFC: Flat directory for notes, or fan-out? Both!, Johannes Schindelin, (Tue Feb 10, 10:09 am)
Re: RFC: Flat directory for notes, or fan-out? Both!, Shawn O. Pearce, (Tue Feb 10, 10:17 am)
Re: RFC: Flat directory for notes, or fan-out? Both!, Sam Vilain, (Tue Feb 10, 6:14 pm)
Re: RFC: Flat directory for notes, or fan-out? Both!, Boyd Stephen Smith Jr., (Tue Feb 10, 6:58 pm)
Re: RFC: Flat directory for notes, or fan-out? Both!, Linus Torvalds, (Tue Feb 10, 7:35 pm)
Re: RFC: Flat directory for notes, or fan-out? Both!, Sam Vilain, (Tue Feb 10, 8:19 pm)
Re: RFC: Flat directory for notes, or fan-out? Both!, Sam Vilain, (Tue Feb 10, 8:30 pm)
Re: RFC: Flat directory for notes, or fan-out? Both!, Linus Torvalds, (Tue Feb 10, 8:54 pm)
Re: RFC: Flat directory for notes, or fan-out? Both!, Sam Vilain, (Tue Feb 10, 10:05 pm)
Re: RFC: Flat directory for notes, or fan-out? Both!, Johannes Schindelin, (Wed Feb 11, 5:35 am)