##// END OF EJS Templates
delta-find: use a single snapshot cache when applying a group to an object...
marmoute -
r50576:c261a628 default
parent child Browse files
Show More
@@ -664,6 +664,7 b' def _candidategroups('
664 664 cachedelta,
665 665 excluded_bases=None,
666 666 target_rev=None,
667 snapshot_cache=None,
667 668 ):
668 669 """Provides group of revision to be tested as delta base
669 670
@@ -689,6 +690,7 b' def _candidategroups('
689 690 p1,
690 691 p2,
691 692 cachedelta,
693 snapshot_cache=snapshot_cache,
692 694 )
693 695 while True:
694 696 temptative = candidates.send(good)
@@ -799,7 +801,7 b' def _candidategroups('
799 801 yield None
800 802
801 803
802 def _refinedgroups(revlog, p1, p2, cachedelta):
804 def _refinedgroups(revlog, p1, p2, cachedelta, snapshot_cache=None):
803 805 good = None
804 806 # First we try to reuse a the delta contained in the bundle.
805 807 # (or from the source revlog)
@@ -819,8 +821,8 b' def _refinedgroups(revlog, p1, p2, cache'
819 821 debug_info['cached-delta.accepted'] += 1
820 822 yield None
821 823 return
822 # XXX cache me higher
823 snapshot_cache = SnapshotCache()
824 if snapshot_cache is None:
825 snapshot_cache = SnapshotCache()
824 826 groups = _rawgroups(
825 827 revlog,
826 828 p1,
@@ -1053,6 +1055,7 b' class deltacomputer:'
1053 1055 self._write_debug = write_debug
1054 1056 self._debug_search = debug_search
1055 1057 self._debug_info = debug_info
1058 self._snapshot_cache = SnapshotCache()
1056 1059
1057 1060 def buildtext(self, revinfo, fh):
1058 1061 """Builds a fulltext version of a revision
@@ -1265,6 +1268,7 b' class deltacomputer:'
1265 1268 cachedelta,
1266 1269 excluded_bases,
1267 1270 target_rev,
1271 snapshot_cache=self._snapshot_cache,
1268 1272 )
1269 1273 candidaterevs = next(groups)
1270 1274 while candidaterevs is not None:
General Comments 0
You need to be logged in to leave comments. Login now