summaryrefslogtreecommitdiff
path: root/http-fetch.c
diff options
context:
space:
mode:
authorLibravatar Nicolas Pitre <nico@cam.org>2007-07-12 14:33:21 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2007-07-12 14:18:14 -0700
commitc83f032e09e49e5bc60686663f7c78d36f72cef4 (patch)
treeec71539f8245c1000bb2dc6c5e4c07481b59b9ef /http-fetch.c
parentUpdate list of older git docs (diff)
downloadtgif-c83f032e09e49e5bc60686663f7c78d36f72cef4.tar.xz
apply delta depth bias to already deltified objects
We already apply a bias on the initial delta attempt with max_size being a function of the base object depth. This has the effect of favoring shallower deltas even if deeper deltas could be smaller, and therefore creating a wider delta tree (see commits 4e8da195 and c3b06a69). This principle should also be applied to all delta attempts for the same object and not only the first attempt. With this the criteria for the best delta is not only its size but also its depth, so that a shallower delta might be selected even if it is larger than a deeper one. Even if some deltas get larger, they allow for wider delta trees making the depth limit less quickly reached and therefore better deltas can be subsequently found, keeping the resulting pack size even smaller. Runtime access to the pack should also benefit from shallower deltas. Testing on different repositories showed slighter faster repacks, smaller resulting packs, and a much nicer curve for delta depth distribution with no more peak at the maximum depth level. Improvements are even more significant with smaller depth limits. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'http-fetch.c')
0 files changed, 0 insertions, 0 deletions