[PATCH resend] store: optimize fncache._load a bit by dirdecoding the contents in one go
Adrian Buehlmann
adrian at cadifra.com
Tue Sep 18 00:31:58 CDT 2012
# HG changeset patch
# User Adrian Buehlmann <adrian at cadifra.com>
# Date 1347946070 -7200
# Node ID 14863c8bce7ea2a1d0be05227f89afde9e34fd3f
# Parent 9e31a72bede706f4c7b251d7bca1ba8d5a543c1b
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)
diff --git a/mercurial/store.py b/mercurial/store.py
--- a/mercurial/store.py
+++ b/mercurial/store.py
@@ -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):
More information about the Mercurial-devel
mailing list