Re: [PATCHv4 08/12] Teach the notes lookup code to parse notes trees with various fanout schemes
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Aug 28, 2009, 11:56 UTC
- Message-ID
- <alpine.DEB.1.00.0908281349270.7434@intel-tinevez-2-302>
- In-Reply-To
- <200908281240.13311.johan@herland.net>
Hi,
On Fri, 28 Aug 2009, Johan Herland wrote:
Show 7 quoted lines
> On Friday 28 August 2009, Johannes Schindelin wrote: > > > And I can easily imagine a repository that has a daily note generated > > by an automatic build, and no other notes. The date-based fan-out > > just wastes our time here, and even hurts performance. > > What about a month-based fanout?
Well, I hoped to convince you that the date-based approach is too rigid. You basically cannot adapt the optimal data layout to the available data.
(I like to think of this issue as related to storing deltas: we let Git choose relatively freely what to delta against, and do not force a delta against the parent commit like others do; I think it is pretty obvious that our approach is more powerful.)
So the simplest (yet powerful-enough) way I could imagine is to teach the reading part to accept any fan-out (but that fan-out is really only based on the object name, nothing else), and to adjust the writing/merging part such that it has a maximum bin size (i.e. it starts a new fan-out whenever a tree object contains more than a config-specifyable limit).
I was certainly not thinking of something as complicated as Huffman.
Ciao, Dscho