D5532: context: schedule file prefetch before comparing for cleanliness

2019-01-15 Thread spectral (Kyle Lippincott)
spectral added a comment.


  In https://phab.mercurial-scm.org/D5532#82319, @yuja wrote:
  
  > > +scmutil.prefetchfiles(
  > >  +self.repo(), [self.p1().rev()],
  > >  +matchmod.match('', '', patterns=self._cache.keys(), 
exact=True))
  >
  > Perhaps `scmutil.matchfiles()` can be used instead of the low-level 
constructor.
  
  
  phab.mercurial-scm.org/https://phab.mercurial-scm.org/D5591

REPOSITORY
  rHG Mercurial

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

To: spectral, #hg-reviewers
Cc: yuja, mjpieters, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D5532: context: schedule file prefetch before comparing for cleanliness

2019-01-11 Thread yuja (Yuya Nishihara)
yuja added a comment.


  > +scmutil.prefetchfiles(
  >  +self.repo(), [self.p1().rev()],
  >  +matchmod.match('', '', patterns=self._cache.keys(), 
exact=True))
  
  Perhaps `scmutil.matchfiles()` can be used instead of the low-level 
constructor.

REPOSITORY
  rHG Mercurial

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

To: spectral, #hg-reviewers
Cc: yuja, mjpieters, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


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

2019-01-11 Thread Yuya Nishihara
> +scmutil.prefetchfiles(
> +self.repo(), [self.p1().rev()],
> +matchmod.match('', '', patterns=self._cache.keys(), exact=True))

Perhaps `scmutil.matchfiles()` can be used instead of the low-level constructor.
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D5532: context: schedule file prefetch before comparing for cleanliness

2019-01-09 Thread spectral (Kyle Lippincott)
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=13107

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

AFFECTED FILES
  mercurial/context.py

CHANGE DETAILS

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:



To: spectral, #hg-reviewers
Cc: mjpieters, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D5532: context: schedule file prefetch before comparing for cleanliness

2019-01-08 Thread spectral (Kyle Lippincott)
spectral created this revision.
Herald added subscribers: mercurial-devel, mjpieters.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  When using a system like remotefilelog, we can occasionally run into scenarios
  where the local content cache does not have the data we need to perform these
  comparisons. These will be fetched on-demand, but individually; if the
  remotefilelog server isn't extremely low latency, the runtime of the command
  becomes dominated by the multiple getfile requests for individual files.
  
  By performing the prefetch, we can download these files in bulk, and save 
server
  resources and many network roundtrips.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/context.py

CHANGE DETAILS

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:



To: spectral, #hg-reviewers
Cc: mjpieters, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel