From: Nicolas Pitre <nico@cam.org>
To: "Shawn O. Pearce" <spearce@spearce.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Peter Eriksen <s022018@student.dtu.dk>,
git@vger.kernel.org
Subject: Re: Understanding version 4 packs
Date: Sun, 25 Mar 2007 21:12:41 -0400 (EDT) [thread overview]
Message-ID: <alpine.LFD.0.83.0703252102520.3041@xanadu.home> (raw)
In-Reply-To: <20070325203141.GA12376@spearce.org>
On Sun, 25 Mar 2007, Shawn O. Pearce wrote:
> Linus Torvalds <torvalds@linux-foundation.org> wrote:
> > On Sun, 25 Mar 2007, Shawn O. Pearce wrote:
> > > >
> > > > What happens to the paths, that do not have a correponding entry in the
> > > > path name table, because they are not among the 65535 most frequent
> > > > paths in the pack?
> > >
> > > They don't appear in the table. And any tree that uses them is
> > > forced to use the "legacy" OBJ_TREE encoding. Which is what we
> > > have now in pack v2, and in loose objects.
> >
> > Would it hurt too much to just make it four bytes, and avoid that issue?
> >
> > Special cases - and *especially* special cases that are hard to trigger in
> > the first place - equal bugs. And bugs are much much worse than trying to
> > save a little bit of space.
>
> Worth exploring. When I get back to rebasing that topic onto
> Junio's tree I'll try a 4 byte index and see what kind of damage
> it does on space on large projects (Mozilla, linux-2.6, Eclipse).
> You may be right, an 8 byte record may just be worth the cost.
Maybe simply 3 bytes might be a good compromise too. I doubt a single
pack is ever to contain 4G paths since it is limited to 4G _objects_ in
the first place.
Another approach is to have the path index field width as the first item
in such an object. This way it can be scalled as needed.
BTW Shawn there is no need to store the number of tree records at the
beginning of the tree object since that can be deduced directly from the
object size stored in the object header.
Nicolas
next prev parent reply other threads:[~2007-03-26 1:12 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-24 20:23 Understanding version 4 packs Peter Eriksen
2007-03-24 23:24 ` Nicolas Pitre
2007-03-25 8:35 ` Peter Eriksen
2007-03-25 9:18 ` Shawn O. Pearce
2007-03-25 17:09 ` Linus Torvalds
2007-03-25 20:31 ` Shawn O. Pearce
2007-03-26 1:12 ` Nicolas Pitre [this message]
2007-03-26 2:02 ` Shawn O. Pearce
2007-03-26 8:49 ` Jakub Narebski
2007-03-26 14:01 ` Nicolas Pitre
2007-03-26 12:16 ` Marco Costalba
2007-03-26 14:27 ` Nicolas Pitre
2007-03-26 17:10 ` Marco Costalba
2007-03-26 18:15 ` Nicolas Pitre
2007-03-26 18:43 ` Nicolas Pitre
2007-03-27 6:46 ` Marco Costalba
2007-03-27 6:55 ` Shawn O. Pearce
2007-03-25 8:46 ` Shawn O. Pearce
2007-03-25 9:40 ` Shawn O. Pearce
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=alpine.LFD.0.83.0703252102520.3041@xanadu.home \
--to=nico@cam.org \
--cc=git@vger.kernel.org \
--cc=s022018@student.dtu.dk \
--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).