From: Nicolas Pitre <nico@cam.org>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] use delta index data when finding best delta matches
Date: Thu, 27 Apr 2006 21:56:00 -0400 (EDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0604272131410.18816@localhost.localdomain> (raw)
In-Reply-To: <7vy7xqh5g6.fsf@assigned-by-dhcp.cox.net>
On Thu, 27 Apr 2006, Junio C Hamano wrote:
> Nicolas Pitre <nico@cam.org> writes:
>
> > This patch allows for computing the delta index for each base object
> > only once and reuse it when trying to find the best delta match.
> >
> > This should set the mark and pave the way for possibly better delta
> > generator algorithms.
> >
> > Signed-off-by: Nicolas Pitre <nico@cam.org>
>
> My understanding is that theoretically this should not make any
> difference to the result, and should run faster when the memory
> pressure does not cause the machine to thrash. However,....
>
> I am seeing some differences. Even with the smallish "git.git"
> repository, packing is slightly slower, and the end result is
> smaller.
Well, I changed some euristics a bit.
> Not that I am complaining that it produces better results with a
> small performance penalty. I am curious because I do not
> understand where the differences are coming from, and I was
> reluctant to merge it in "next" until I understand what is going
> on.
>
> But I think I know where the differences come from:
>
> - sizediff = oldsize > size ? oldsize - size : size - oldsize;
> + sizediff = src_size < size ? size - src_size : 0;
Right. The idea is that when the delta source index has to be computed
each time, if the target buffer is really small then we spend more time
computing that index than anything else.
But when the delta index is computed only once and already available
anyway, we don't lose much attempting a delta with a small target buffer
since the delta computation is non-existent at that point and the actual
delta generation will be quick if the target buffer is small.
> There is another "omit smaller than 50" difference but that
> should not trigger -- we do not have files that small.
Right. And if such small files show up they won't waste window space.
Nicolas
next prev parent reply other threads:[~2006-04-28 1:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-26 3:37 [PATCH/RFC] reverse the pack-objects delta window logic Nicolas Pitre
2006-04-26 5:45 ` Junio C Hamano
2006-04-26 15:48 ` Nicolas Pitre
2006-04-26 17:48 ` Nicolas Pitre
2006-04-27 3:05 ` Nicolas Pitre
2006-04-27 3:58 ` [PATCH] use delta index data when finding best delta matches Nicolas Pitre
2006-04-28 1:08 ` Junio C Hamano
2006-04-28 1:56 ` Nicolas Pitre [this message]
2006-04-27 5:04 ` [PATCH/RFC] reverse the pack-objects delta window logic Junio C Hamano
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=Pine.LNX.4.64.0604272131410.18816@localhost.localdomain \
--to=nico@cam.org \
--cc=git@vger.kernel.org \
--cc=junkio@cox.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.
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).