Re: gc --aggressive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Nicolas Pitre <nico@xxxxxxxxxxx> writes:

> One final quick test if you feel like it: I've never been sure that 
> the last comparison in type_size_sort() is correct.  Maybe it should be 
> the other way around.  Currently it reads:
>
> 	return a < b ? -1 : (a > b);
>
> While keeping the size comparison commented out, you could try to 
> replace this line with:
>
> 	return b < a ? -1 : (b > a);
>
> If this doesn't improve things then it would be clear that this avenue 
> should be abandoned.

Very interesting.  The difference between the two should only matter if
there are many blobs with exactly the same size, and most of them delta
horribly with each other.  Does the problematic repository exhibit such
a characteristic?

The original tie-breaks based on the address (the earlier object we read
in the original input comes earlier in the output) and yours make the
objects later we read (which in turn are from older parts of the history)
come early, but adjacency between two objects of the same type and the
same size would not change (if A and B were next to each other in this
order, your updated sorter will give B and then A still next to each
other), so I suspect not much would change in the candidate selection.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]