store: optimize fncache._load a bit by dirdecoding the contents in one go
authorAdrian Buehlmann <adrian@cadifra.com>
Mon, 17 Sep 2012 11:00:38 +0200
changeset 17604 bf9894889d82
parent 17603 a7fa5bd1c914
child 17605 e9cc29be3305
store: optimize fncache._load a bit by dirdecoding the contents in one go For a netbeans clone on Windows 7 x64: Before: $ hg perffncacheload ! wall 0.124000 comb 0.124801 user 0.124801 sys 0.000000 (best of 76) After: $ hg perffncacheload ! wall 0.096000 comb 0.093601 user 0.078001 sys 0.015600 (best of 97)
mercurial/store.py
--- a/mercurial/store.py	Tue Sep 18 17:00:58 2012 +0200
+++ b/mercurial/store.py	Mon Sep 17 11:00:38 2012 +0200
@@ -336,7 +336,7 @@
             # skip nonexistent file
             self.entries = set()
             return
-        self.entries = set(map(decodedir, fp.read().splitlines()))
+        self.entries = set(decodedir(fp.read()).splitlines())
         if '' in self.entries:
             fp.seek(0)
             for n, line in enumerate(fp):