Re: [PATCH 09/41] pack-objects: abstract away hash algorithm

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

 



On Mon, Apr 23, 2018 at 11:39:19PM +0000, brian m. carlson wrote:
> @@ -1850,7 +1852,7 @@ static int try_delta(struct unpacked *trg, struct unpacked *src,
>  	/* Now some size filtering heuristics. */
>  	trg_size = trg_entry->size;
>  	if (!trg_entry->delta) {
> -		max_size = trg_size/2 - 20;
> +		max_size = trg_size/2 - the_hash_algo->rawsz;

This may be questionable. Note the "heuristics" comment above. I'm not
even sure if this is hash size or some magical-yet-randomly-good
value. Just wanted to bring the attention for other people with better
understand of this code to see

>  		ref_depth = 1;
>  	} else {
>  		max_size = trg_entry->delta_size;



[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]

  Powered by Linux