git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Nicolas Pitre <nico@fluxnic.net>
Cc: Duy Nguyen <pclouds@gmail.com>, Git Mailing List <git@vger.kernel.org>
Subject: Re: pack-object's try_delta fast path for v2 trees?
Date: Mon, 14 Oct 2013 21:51:13 -0400	[thread overview]
Message-ID: <20131015015113.GA17486@sigill.intra.peff.net> (raw)
In-Reply-To: <alpine.LFD.2.03.1310142141200.1873@syhkavp.arg>

On Mon, Oct 14, 2013 at 09:45:12PM -0400, Nicolas Pitre wrote:

> > No, as far as I know, it is a novel idea. When we were discussing commit
> > caching a while back, Shawn suggested slicing trees on boundaries and
> > store delta instructions that were pure "change this entry", "add this
> > entry", and "delete this entry" chunks. The deltas might end up a little
> > bigger, but if the reader knew the writer had sliced in this way, it
> > could get a packv4-style cheap tree-diff, while remaining backwards
> > compatible with implementations that just blindly reassemble the buffer
> > from delta instructions.
> > 
> > I didn't get far enough to try it, but doing what you propose would be
> > the first step. Now that packv4 is more of a reality, it may not be
> > worth pursuing, though.
> 
> The "easy" way to produce pack v2 tree objects from a pack v4 would be 
> exactly that: take the pack v4 tree encoding and do a straight 
> translation into delta encoding using the base from which the most 
> entries are copied from.

Yeah, that makes a lot of sense.

By the way, I'm sorry I haven't looked more carefully at the packv4
patches yet. I am excited about it, but I've just got a long queue of
other things (and because it's big and challenging, it's easy to put
off).

One of the things that makes me most nervous about switching to it on
the server side is that we'll have packv2-only clients for a while, and
I worry that converting to v2 on the fly is going to end up costing a
lot (even with clever tricks like this, you still have to pay the cost
to zlib deflate each item). But even if it is slow, the sooner we have
packv4 readers, the sooner the clocks start ticking for it being a
reasonable decision for a big server provider to switch.

-Peff

  reply	other threads:[~2013-10-15  1:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-12  3:42 pack-object's try_delta fast path for v2 trees? Duy Nguyen
2013-10-12 14:52 ` Nicolas Pitre
2013-10-15  0:19 ` Jeff King
2013-10-15  0:49   ` Duy Nguyen
2013-10-15  0:54     ` Jeff King
2013-10-15  1:45   ` Nicolas Pitre
2013-10-15  1:51     ` Jeff King [this message]
2013-10-15  2:13       ` Nicolas Pitre

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=20131015015113.GA17486@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=nico@fluxnic.net \
    --cc=pclouds@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).