comparison hgext/remotefilelog/fileserverclient.py @ 42036:0129bf02fa04

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
author Martin von Zweigbergk <martinvonz@google.com>
date Wed, 27 Mar 2019 14:55:46 -0700
parents aaad36b88298
children 65f3a77223e0
comparison
equal deleted inserted replaced
42035:eec20025ada3 42036:0129bf02fa04
542 fetchwarning = self.ui.config('remotefilelog', 542 fetchwarning = self.ui.config('remotefilelog',
543 'fetchwarning') 543 'fetchwarning')
544 if fetchwarning: 544 if fetchwarning:
545 self.ui.warn(fetchwarning + '\n') 545 self.ui.warn(fetchwarning + '\n')
546 self.logstacktrace() 546 self.logstacktrace()
547 missingids = [(file, hex(id)) for file, id in missingids] 547 missingids = [(file, hex(id)) for file, id in sorted(missingids)]
548 fetched += len(missingids) 548 fetched += len(missingids)
549 start = time.time() 549 start = time.time()
550 missingids = self.request(missingids) 550 missingids = self.request(missingids)
551 if missingids: 551 if missingids:
552 raise error.Abort(_("unable to download %d files") % 552 raise error.Abort(_("unable to download %d files") %