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