• Nicolas Pitre's avatar
    simple euristic for further free packing improvements · 4e8da195
    Nicolas Pitre authored
    Given that the early eviction of objects with maximum delta depth
    may exhibit bad packing on its own, why not considering a bias against
    deep base objects in try_delta() to mitigate that bad behavior.
    
    This patch adjust the MAX_size allowed for a delta based on the depth of
    the base object as well as enabling the early eviction of max depth
    objects from the object window.  When used separately, those two things
    produce slightly better and much worse results respectively.  But their
    combined effect is a surprising significant packing improvement.
    
    With this really simple patch the GIT repo gets nearly 15% smaller, and
    the Linux kernel repo about 5% smaller, with no significantly measurable
    CPU usage difference.
    Signed-off-by: default avatarNicolas Pitre <nico@cam.org>
    Signed-off-by: default avatarJunio C Hamano <junkio@cox.net>
    4e8da195
pack-objects.c 33.4 KB