git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: Nicolas Pitre <nico@cam.org>
Cc: Troy Telford <ttelford.groups@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH] Support 64-bit indexes for pack files.
Date: Mon, 26 Feb 2007 19:31:18 -0500	[thread overview]
Message-ID: <20070227003118.GH1639@spearce.org> (raw)
In-Reply-To: <alpine.LRH.0.82.0702261916560.29426@xanadu.home>

Nicolas Pitre <nico@cam.org> wrote:
> On Mon, 26 Feb 2007, Shawn O. Pearce wrote:
> > The latter field is to help pack-objects reuse existing packfile
> > data, as today it needs to sort everything on its own on the fly.
> > Having that last field of data will help avoid that, and will keep
> > the index nicely aligned for 64-bit accesses to the offset.
> 
> Wouldn't that later field help the sliding mmap code as well, knowing in 
> advance what storage size a given object has? (I didn't look at the 
> sliding mmap code so I don't know).

Yes, it probably would.
 
> Actually I've been thinking about another format already.
> 
> What about keeping the pack offset as 32 bits like it is today, but for 
> index v2 if the top bit is set then this become an index into another 
> table containing 64-bit offsets as needed.  This way there is no waste 
> of space for most projects where the pack has yet to reach the 2GB limit 
> for many years to come.

Actually Troy's patch tries to do this by using the current format
and only switching to the new one if the packfile exceeds 4 GiB.
Rather smart.

One thought I had here was to expand the fan-out table from 1<<8
entries to 1<<16 entries, then store only the low 18 bytes of
the SHA-1.  We would have another 2 bytes worth of space to store
the offset, pushing our total offset up to 48 bits.

-- 
Shawn.

  reply	other threads:[~2007-02-27  0:31 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-26 22:40 [PATCH] Support 64-bit indexes for pack files Troy Telford
2007-02-26 23:55 ` Shawn O. Pearce
2007-02-27  0:24   ` Nicolas Pitre
2007-02-27  0:31     ` Shawn O. Pearce [this message]
2007-02-27  4:32       ` Nicolas Pitre
2007-02-27  4:55         ` Geert Bosch
2007-02-27  5:11           ` Nicolas Pitre
2007-02-27 16:04             ` Geert Bosch
2007-02-27 16:11               ` Shawn O. Pearce
2007-02-27 16:55                 ` Geert Bosch
2007-02-27 17:36                   ` Nicolas Pitre
2007-02-28  3:52                     ` Shawn O. Pearce
2007-02-28  4:12                       ` Nicolas Pitre
2007-02-27 17:03               ` Nicolas Pitre
2007-02-27 20:05               ` Johannes Schindelin
2007-02-27 20:25                 ` Geert Bosch
2007-02-27 20:35                   ` Johannes Schindelin
2007-02-27  1:16   ` Troy Telford
2007-02-27  4:56   ` Nicolas Pitre
2007-02-28 19:46 ` Troy Telford

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=20070227003118.GH1639@spearce.org \
    --to=spearce@spearce.org \
    --cc=git@vger.kernel.org \
    --cc=nico@cam.org \
    --cc=ttelford.groups@gmail.com \
    /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).