git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Duy Nguyen <pclouds@gmail.com>
To: Jeff King <peff@peff.net>
Cc: Nicolas Pitre <nico@fluxnic.net>, Git Mailing List <git@vger.kernel.org>
Subject: Re: pack-object's try_delta fast path for v2 trees?
Date: Tue, 15 Oct 2013 07:49:57 +0700	[thread overview]
Message-ID: <CACsJy8DgjCR+B+Bvbydns=bCZP5=TU1avPinnuDKqLZXS=4LNQ@mail.gmail.com> (raw)
In-Reply-To: <20131015001926.GC10415@sigill.intra.peff.net>

On Tue, Oct 15, 2013 at 7:19 AM, Jeff King <peff@peff.net> wrote:
> On Sat, Oct 12, 2013 at 10:42:17AM +0700, Nguyen Thai Ngoc Duy wrote:
>
>> Just wondering if this has been considered and dropped before.
>> Currently we use try_delta() for every object including trees. But
>> trees are special. All tree entries must be unique and sorted. That
>> helps simplify diff algorithm, as demonstrated by diff_tree() and
>> pv4_encode_tree(). A quick and dirty test with test-delta shows that
>> tree_diff only needs half the time of diff_delta(). As trees account
>> for like half the objects in a repo, speeding up delta search might
>> help performance, I think.
>
> 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.

I see this as pack-objects peformance improvements only. If we could
make pack-objects run like 10% faster (even only with -adf), then it
may be worth trying. The 10% is a total guess though as I haven't
checked how much time we spend in searching deltas.
-- 
Duy

  reply	other threads:[~2013-10-15  0:50 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 [this message]
2013-10-15  0:54     ` Jeff King
2013-10-15  1:45   ` Nicolas Pitre
2013-10-15  1:51     ` Jeff King
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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to='CACsJy8DgjCR+B+Bvbydns=bCZP5=TU1avPinnuDKqLZXS=4LNQ@mail.gmail.com' \
    --to=pclouds@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=nico@fluxnic.net \
    --cc=peff@peff.net \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).