comparison mercurial/localrepo.py @ 24033:ed5e8a9598ce

manifest: make lru size configurable On machines with lots of ram, it's beneficial to increase the lru size of the manifest cache. On a large repo, configuring the lru to be size 10 can shave a large rebase (~12 commits) down from 95s to 70s.
author Durham Goode <durham@fb.com>
date Fri, 23 Jan 2015 17:06:03 -0800
parents a43fdf33a6be
children b08af8f0ac01
comparison
equal deleted inserted replaced
24032:c53bc2e52514 24033:ed5e8a9598ce
321 if chunkcachesize is not None: 321 if chunkcachesize is not None:
322 self.svfs.options['chunkcachesize'] = chunkcachesize 322 self.svfs.options['chunkcachesize'] = chunkcachesize
323 maxchainlen = self.ui.configint('format', 'maxchainlen') 323 maxchainlen = self.ui.configint('format', 'maxchainlen')
324 if maxchainlen is not None: 324 if maxchainlen is not None:
325 self.svfs.options['maxchainlen'] = maxchainlen 325 self.svfs.options['maxchainlen'] = maxchainlen
326 manifestcachesize = self.ui.configint('format', 'manifestcachesize')
327 if manifestcachesize is not None:
328 self.svfs.options['manifestcachesize'] = manifestcachesize
326 329
327 def _writerequirements(self): 330 def _writerequirements(self):
328 reqfile = self.vfs("requires", "w") 331 reqfile = self.vfs("requires", "w")
329 for r in sorted(self.requirements): 332 for r in sorted(self.requirements):
330 reqfile.write("%s\n" % r) 333 reqfile.write("%s\n" % r)