remotefilelog: prefetch files in deterministic order
I have been troubleshooting some slowness in this area (it's unclear
if it's the client or server that's to blame, but that's beside the
point) and it's a lot easier to do troubleshoot if the files are
prefetched in the same order each time.
Differential Revision: https://phab.mercurial-scm.org/D6172
--- a/hgext/remotefilelog/fileserverclient.py Tue Mar 26 17:35:28 2019 +0100
+++ b/hgext/remotefilelog/fileserverclient.py Wed Mar 27 14:55:46 2019 -0700
@@ -544,7 +544,7 @@
if fetchwarning:
self.ui.warn(fetchwarning + '\n')
self.logstacktrace()
- missingids = [(file, hex(id)) for file, id in missingids]
+ missingids = [(file, hex(id)) for file, id in sorted(missingids)]
fetched += len(missingids)
start = time.time()
missingids = self.request(missingids)