[Bug 4572] New: lazymanifest makes hg revert --all -r .^ takes 60+s on large repos
mercurial-bugs at selenic.com
mercurial-bugs at selenic.com
Wed Mar 18 00:08:18 UTC 2015
http://bz.selenic.com/show_bug.cgi?id=4572
Priority: normal
Bug ID: 4572
CC: durin42 at gmail.com, martinvonz at google.com,
mercurial-devel at selenic.com
Assignee: bugzilla at selenic.com
Summary: lazymanifest makes hg revert --all -r .^ takes 60+s on
large repos
Severity: bug
Classification: Unclassified
OS: Mac OS
Reporter: durham at fb.com
Hardware: PC
Status: UNCONFIRMED
Version: default branch
Component: Mercurial
Product: Mercurial
With the the new lazymanifest bits, 'hg revert -r .^ --all' takes 60s. This is
caused by manifestdict.intersectfiles being implemented as:
def intersectfiles(self, files):
ret = manifestdict()
lm = self._lm
for fn in files:
if fn in lm:
ret._lm[fn] = self._lm[fn]
return ret
where len(files) is huge and every 'fn in files' check takes O(log len(lm)). A
temporary solution might be to add a set here if len(files) > 1000 or so. The
right fix is to probably move intersectfiles into c code and do the look ups
intelligently across the lazy manifest.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Mercurial-devel
mailing list