Skip to content
Snippets Groups Projects
Commit 410afe5b authored by Pierre-Yves David's avatar Pierre-Yves David :octopus:
Browse files

delta-find: clarify some comment and code in is_good_delta_info

We move the comment closer to the code it describ and we compute an
intermediate value without using the `textlen` variable, as it will stop being
defined in a future patch.

This will clarify future patches.
parent 176d530f
No related branches found
No related tags found
1 merge request!752introduce subclass for delta-search
This commit is part of merge request !752. Comments created here will be created in the context of that merge request.
......@@ -1066,9 +1066,6 @@
# - 'deltainfo.distance' is the distance from the base revision --
# bounding it limits the amount of I/O we need to do.
# - 'deltainfo.compresseddeltalen' is the sum of the total size of
# deltas we need to apply -- bounding it limits the amount of CPU
# we consume.
textlen = self.revinfo.textlen
defaultmax = textlen * 4
......@@ -1094,4 +1091,8 @@
# Bad delta from cumulated payload size:
#
# - 'deltainfo.compresseddeltalen' is the sum of the total size of
# deltas we need to apply -- bounding it limits the amount of CPU
# we consume.
max_chain_data = self.revinfo.textlen * LIMIT_DELTA2TEXT
# If the sum of delta get larger than K * target text length.
......@@ -1097,5 +1098,5 @@
# If the sum of delta get larger than K * target text length.
if textlen * LIMIT_DELTA2TEXT < deltainfo.compresseddeltalen:
if max_chain_data < deltainfo.compresseddeltalen:
return False
# Bad delta from chain length:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment