From: Junio C Hamano <junkio@cox•net>
To: Linus Torvalds <torvalds@osdl•org>
Cc: git@vger•kernel.org
Subject: Re: [RFC] Cache negative delta pairs
Date: Thu, 29 Jun 2006 15:22:59 -0700 [thread overview]
Message-ID: <7vsllnob3w.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <Pine.LNX.4.64.0606291352110.12404@g5.osdl.org> (Linus Torvalds's message of "Thu, 29 Jun 2006 14:04:01 -0700 (PDT)")
Linus Torvalds <torvalds@osdl•org> writes:
> On Thu, 29 Jun 2006, Nicolas Pitre wrote:
>>
>> The negative delta cache concept is certainly attractive even for normal
>> repositories, especially for public servers, since when used in
>> conjonction with delta reuse it makes the creation of a pack basically
>> free. So I think this idea really has merits, as long as the cache
>> remains small.
>
> I don't really see much of a point of this all.
>
> Instead of having a separate cache, wouldn't it be much better to just
> take the hint from the previous pack-file?
>
> In the repacking window, if both objects we are looking at already came
> from the same (old) pack-file, don't bother delta'ing them against each
> other.
>
> That means that we'll still always check for better deltas for (and
> against!) _unpacked_ objects, but assuming incremental repacks, you'll
> avoid the delta creation 99% of the time.
>
> Ie somethng really simple like the appended.
>
> Linus
> ---
> diff --git a/pack-objects.c b/pack-objects.c
> index bed2497..cea63e7 100644
> --- a/pack-objects.c
> +++ b/pack-objects.c
> @@ -988,6 +988,13 @@ static int try_delta(struct unpacked *tr
> return -1;
>
> /*
> + * We do not bother to try a delta that we discarded
> + * on an earlier try
> + */
> + if (trg_entry->in_pack && trg_entry->in_pack == src_entry->in_pack)
> + return -1;
> +
> + /*
I think you meant to return 0 from here though. -1 means "do
not use this pair and do not bother try improving it with the
remaining candidates".
next prev parent reply other threads:[~2006-06-29 22:23 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20060628223744.GA24421@coredump.intra.peff.net>
2006-06-29 3:09 ` [RFC] Cache negative delta pairs Junio C Hamano
2006-06-29 3:50 ` Jeff King
2006-06-29 3:58 ` Jeff King
2006-06-29 4:30 ` Jeff King
2006-06-29 16:39 ` Nicolas Pitre
2006-06-29 18:07 ` Jeff King
2006-06-29 18:48 ` Nicolas Pitre
2006-06-29 18:58 ` Jeff King
2006-06-29 19:06 ` Nicolas Pitre
2006-06-29 4:09 ` Jeff King
2006-06-29 15:42 ` Nicolas Pitre
2006-06-29 16:35 ` Nicolas Pitre
2006-06-29 18:00 ` Jeff King
2006-06-29 18:24 ` Nicolas Pitre
2006-06-29 18:53 ` Jeff King
2006-06-29 19:04 ` Nicolas Pitre
2006-06-29 19:52 ` Jeff King
2006-06-29 20:24 ` Nicolas Pitre
2006-06-29 21:04 ` Linus Torvalds
2006-06-29 21:24 ` Nicolas Pitre
2006-06-29 21:30 ` Linus Torvalds
2006-06-29 21:39 ` Jeff King
2006-06-29 21:43 ` Joel Becker
2006-06-29 21:47 ` Nicolas Pitre
2006-06-29 22:12 ` Junio C Hamano
2006-06-30 3:44 ` [PATCH] consider previous pack undeltified object state only when reusing delta data Nicolas Pitre
2006-06-30 9:45 ` Johannes Schindelin
2006-06-30 12:28 ` Andreas Ericsson
2006-06-30 16:55 ` Nicolas Pitre
2006-07-03 8:11 ` Andreas Ericsson
2006-06-29 21:35 ` [RFC] Cache negative delta pairs Jeff King
2006-06-29 21:54 ` Junio C Hamano
2006-06-29 22:22 ` Junio C Hamano [this message]
2006-06-29 21:26 ` Junio C Hamano
2006-06-29 21:37 ` Jeff King
2006-06-29 22:31 ` Jakub Narebski
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=7vsllnob3w.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox$(echo .)net \
--cc=git@vger$(echo .)kernel.org \
--cc=torvalds@osdl$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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