This is an archive of the discontinued Mercurial Phabricator instance.

context: schedule file prefetch before comparing for cleanliness
ClosedPublic

Authored by spectral on Jan 8 2019, 5:33 PM.

Details

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.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

spectral created this revision.Jan 8 2019, 5:33 PM
This revision was automatically updated to reflect the committed changes.
yuja added a subscriber: yuja.Jan 11 2019, 10:04 PM

+ 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.

In 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/D5591