##// END OF EJS Templates
perf: avoid actual writing branch cache out correctly...
FUJIWARA Katsunori -
r30145:113aa614 default
parent child Browse files
Show More
@@ -884,16 +884,17 b' def perfbranchmap(ui, repo, full=False, '
884 repo.filtered(name).branchmap()
884 repo.filtered(name).branchmap()
885 # add unfiltered
885 # add unfiltered
886 allfilters.append(None)
886 allfilters.append(None)
887 oldread = branchmap.read
887
888 oldwrite = branchmap.branchcache.write
888 branchcacheread = safeattrsetter(branchmap, 'read')
889 branchcachewrite = safeattrsetter(branchmap.branchcache, 'write')
890 branchcacheread.set(lambda repo: None)
891 branchcachewrite.set(lambda bc, repo: None)
889 try:
892 try:
890 branchmap.read = lambda repo: None
891 branchmap.write = lambda repo: None
892 for name in allfilters:
893 for name in allfilters:
893 timer(getbranchmap(name), title=str(name))
894 timer(getbranchmap(name), title=str(name))
894 finally:
895 finally:
895 branchmap.read = oldread
896 branchcacheread.restore()
896 branchmap.branchcache.write = oldwrite
897 branchcachewrite.restore()
897 fm.end()
898 fm.end()
898
899
899 @command('perfloadmarkers')
900 @command('perfloadmarkers')
General Comments 0
You need to be logged in to leave comments. Login now