git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sam Vilain <sam@vilain.net>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: "Boyd Stephen Smith Jr." <bss@iguanasuicide.net>,
	Jeff King <peff@peff.net>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	git@vger.kernel.org, spearce@spearce.org
Subject: Re: RFC: Flat directory for notes, or fan-out?  Both!
Date: Wed, 11 Feb 2009 18:05:47 +1300	[thread overview]
Message-ID: <49925CAB.505@vilain.net> (raw)
In-Reply-To: <alpine.LFD.2.00.0902101953170.3590@localhost.localdomain>

Linus Torvalds wrote:
>> The only case where it hurts is when you want to merge. Nothing else
>> should care. So, if a merge of these note trees sees two different trie
>> sizes then it can convert the shorter one to the longer length first,
>> and then try the merge again. So you get the pain, but only once. And
>> when a project decides that its split is too small, it can split then
>> and it should "silently" spread out to others.
>>     
>
> But what's the advantage of the added complexity?
>
> The non-fixed trie only helps for the case that doesn't matter - just a 
> few annotations. If you have a thousand annotations or less, you _really_ 
> don't care. Whatever you do will be fine.
>
> So the whole thing only matters once you have tens of thousands of 
> entries, and then you do want to have fan-out. No?
>   

Yeah. I see your point and you may be right, that a 12/28 split hurts
no-one, if we take this to the benchmarks. There's certainly savings in
terms of total object count for the small users by using a smaller split.

I just already wrote the code to handle an arbitrary split for the
features written so far[1]. If *I* can write it, in C, it means it must
not be that complicated ;-)

So it comes down to how complicated things are when merging happens. If
12 is fixed in stone this is simple, because there are no chances for
discrepancies. But refs/notes/commits still needs special treatment to
be fetched, because it is not under refs/heads/* and you wouldn't
normally have a working tree to resolve conflicts.

So I think probably the most productive thing to do is for me to write
the code to handle the merge as I described above, once the code to
handle pulling in - and merging - notes at 'git fetch' time is written.
Then we can see whether it's that much of a complication.

To bench this we need the current builtin-log implementation to be
re-written to be lazy. Which means we can't put it in the next release
unless someone writes that. However my proposal means that we can
release as we are and not care, and let some code - which I hope I have
shown isn't *that* complicated, really - deal with it in a later
release, and not break backwards compatibility.

Sam.

1. see message <1233455960.17688.122.camel@maia.lan>

  reply	other threads:[~2009-02-11  5:07 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49925CAB.505@vilain.net \
    --to=sam@vilain.net \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=bss@iguanasuicide.net \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=spearce@spearce.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).