HomePhabricator

deltas: skip if projected delta size does not match text size constraint

Authored by marmoute.

Description

deltas: skip if projected delta size does not match text size constraint

Before computing any delta, we get a basic estimation of the delta size we can
expect and the resulted compressed value. We then checks this projected size
against the ½ⁿ size constraints. This allows to exclude potential base
candidates before doing any expensive computation.

This only apply to the intermediate-snapshot case since this constraint only
apply to them.

In practice we only perform this new checks for the manifestlog. Manifest log
combine two property: it is likely to have delta chain issue and its
diffing/compression is fairly predictable.

The initial author of this changeset is Valentin Gatien-Baron providing the
initial idea and initial testing, Pierre-Yves David later consolidated the code
in the right location and run more extensive testing.

Details

Committed
marmouteApr 25 2019, 4:30 PM
Parents
rHGbc4373babd04: revlog: add the option to track the expected compression upper bound
Branches
Unknown
Tags
Unknown