Re: [PATCH] relax delta selection filtering in pack-objects
- From
Nicolas Pitre <nico@cam.org>
- Date
- Feb 22, 2006, 16:04 UTC
- Message-ID
- <Pine.LNX.4.64.0602221058320.5606@localhost.localdomain>
- In-Reply-To
- <7vhd6rsvqd.fsf@assigned-by-dhcp.cox.net>
On Tue, 21 Feb 2006, Junio C Hamano wrote:
Show 10 quoted lines
> Junio C Hamano <junkio@cox.net> writes: > > > I haven't dug into the issue yet, but these four delta series > > seem to break the testsuite. > > I bisected. It is the adler32 one -- since it makes the > generated delta much smaller, it is understandable that it would > interact with the break/rename heuristics. It is not strictly > breakage in that sense -- we just need to readjust the > heuristics thresholds for those algorithms.
I had a quick look and that code rather looks like black magic to me atm. I however found a memory leak in diffcore-rename.c:estimate_similarity():
delta = diff_delta(src->data, src->size,
dst->data, dst->size,
&delta_size, delta_limit);
if (!delta)
/* If delta_limit is exceeded, we have too much differences */
return 0; /* A delta that has a lot of literal additions would have
* big delta_size no matter what else it does.
*/
if (base_size * (MAX_SCORE-minimum_score) < delta_size * MAX_SCORE)
return 0;
\________ delta memory is leaked.Nicolas