Patchwork D5532: context: schedule file prefetch before comparing for cleanliness

login
register
mail settings
Submitter phabricator
Date Jan. 9, 2019, 8:11 p.m.
Message ID <e6fca547b13854fb84e046e6d77df20a@localhost.localdomain>
Download mbox | patch
Permalink /patch/37588/
State Not Applicable
Headers show

Comments

phabricator - Jan. 9, 2019, 8:11 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGf18f665b1424: context: schedule file prefetch before comparing for cleanliness (authored by spectral, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5532?vs=13084&id=13107

REVISION DETAIL
  https://phab.mercurial-scm.org/D5532

AFFECTED FILES
  mercurial/context.py

CHANGE DETAILS




To: spectral, #hg-reviewers
Cc: mjpieters, mercurial-devel

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -2018,6 +2018,12 @@ 
         to resolve a conflict.
         """
         keys = []
+        # This won't be perfect, but can help performance significantly when
+        # using things like remotefilelog.
+        scmutil.prefetchfiles(
+            self.repo(), [self.p1().rev()],
+            matchmod.match('', '', patterns=self._cache.keys(), exact=True))
+
         for path in self._cache.keys():
             cache = self._cache[path]
             try: