@matheusbsbs / matheus-bagliano / commits / cac251d0bc
Fork 0

relax delta selection filtering in pack-objects

This change provides a 8% saving on the pack size with a 4% CPU time increase for git-repack -a on the current git archive. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>

Nicolas Pitre committed Feb 21, 2006 at 20:39 UTC cac251d0bc4c68b7ab36026990aff3c783913ae6
1 file changed +2 -3
pack-objects.c
+2 -3
@@ -629,11 +629,10 @@ static int try_delta(struct unpacked *cur, struct unpacked *old, unsigned max_de
629 }
630
631 size = cur_entry->size;
632 - if (size < 50)
633 - return -1;
632 oldsize = old_entry->size;
633 sizediff = oldsize > size ? oldsize - size : size - oldsize;
636 - if (sizediff > size / 8)
634 +
635 + if (size < 50)
636 return -1;
637 if (old_entry->depth >= max_depth)
638 return 0;