##// END OF EJS Templates
revlog: isgooddeltainfo takes the whole revinfo object...
Paul Morelle -
r38129:69ec6f98 default
parent child Browse files
Show More
@@ -449,7 +449,7 b' class _deltacomputer(object):'
449 if revlog.flags(candidaterev) & REVIDX_RAWTEXT_CHANGING_FLAGS:
449 if revlog.flags(candidaterev) & REVIDX_RAWTEXT_CHANGING_FLAGS:
450 continue
450 continue
451 candidatedelta = self._builddeltainfo(revinfo, candidaterev, fh)
451 candidatedelta = self._builddeltainfo(revinfo, candidaterev, fh)
452 if revlog._isgooddeltainfo(candidatedelta, revinfo.textlen):
452 if revlog._isgooddeltainfo(candidatedelta, revinfo):
453 nominateddeltas.append(candidatedelta)
453 nominateddeltas.append(candidatedelta)
454 if nominateddeltas:
454 if nominateddeltas:
455 deltainfo = min(nominateddeltas, key=lambda x: x.deltalen)
455 deltainfo = min(nominateddeltas, key=lambda x: x.deltalen)
@@ -2093,7 +2093,7 b' class revlog(object):'
2093
2093
2094 return compressor.decompress(data)
2094 return compressor.decompress(data)
2095
2095
2096 def _isgooddeltainfo(self, deltainfo, textlen):
2096 def _isgooddeltainfo(self, deltainfo, revinfo):
2097 """Returns True if the given delta is good. Good means that it is within
2097 """Returns True if the given delta is good. Good means that it is within
2098 the disk span, disk size, and chain length bounds that we know to be
2098 the disk span, disk size, and chain length bounds that we know to be
2099 performant."""
2099 performant."""
@@ -2106,6 +2106,7 b' class revlog(object):'
2106 # deltas we need to apply -- bounding it limits the amount of CPU
2106 # deltas we need to apply -- bounding it limits the amount of CPU
2107 # we consume.
2107 # we consume.
2108
2108
2109 textlen = revinfo.textlen
2109 defaultmax = textlen * 4
2110 defaultmax = textlen * 4
2110 maxdist = self._maxdeltachainspan
2111 maxdist = self._maxdeltachainspan
2111 if not maxdist:
2112 if not maxdist:
General Comments 0
You need to be logged in to leave comments. Login now