[Bug 5538] New: followlines() spends a lot of time in linkrev adjustment
mercurial-bugs at mercurial-scm.org
mercurial-bugs at mercurial-scm.org
Fri Apr 14 19:01:28 UTC 2017
https://bz.mercurial-scm.org/show_bug.cgi?id=5538
Bug ID: 5538
Summary: followlines() spends a lot of time in linkrev
adjustment
Product: Mercurial
Version: default branch
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: bug
Priority: normal
Component: Mercurial
Assignee: bugzilla at mercurial-scm.org
Reporter: gregory.szorc at gmail.com
CC: mercurial-devel at mercurial-scm.org,
pierre-yves.david at ens-lyon.org
On the Firefox repo, `hg log -r 'followlines("layout/generic/nsBlockFrame.cpp",
2750:2850)'` spends ~85% of execution time in linkrev adjustment:
$ hg log -r 'followlines("layout/generic/nsBlockFrame.cpp", 2750:2850)'
--pager=false -T '{rev}\n' --profile
| 100.0% dispatch.py: callcatch line 45:
mercurial.dispatch.run()
| 100.0% scmutil.py: callcatch line 234: return
scmutil.callcatch(ui...
| 100.0% dispatch.py: _runcatchfunc line 145: return func()
| 100.0% blackbox.py: log line 215: return
_dispatch(req)
| 99.8% commands.py: log line 3546: return orig(ui,
repo, *args...
| 99.8% cmdutil.py: getlogrevs line 3418: revs, expr,
filematcher = c...
| 98.2% cmdutil.py: _makelogrevset line 2138: expr,
filematcher = _makelo...
| 98.2% smartset.py: __iter__ line 1961: it = iter(revs)
| 98.2% smartset.py: _consumegen line 815: for x in
self._consumegen():
| 98.2% revset.py: <genexpr> line 846: for item in
self._gen:
| 98.2% context.py: blockancestors line 954: (c.rev() for c,
_linerange
\ 85.9% util.py: __get__ line 763: return
self._changeid
| 85.9% context.py: _changeid line 815: result =
self.func(obj)
| 85.9% context.py: _adjustlinkrev line 700: return
self._adjustlinkrev(...
| 85.9% ancestor.py: __contains__ line 860: if lkr not in
memberanc:
| 29.0% changelog.py: parentrevs line 353: for parent in
parentrevs(-h...
| 9.7% revlog.py: parentrevs line 359: return
super(changelog, sel...
\ 12.2% context.py: _changesrange line 1200: inrangep,
linerange1 = _cha...
| 11.6% context.py: data line 1178: blocks =
mdiff.allblocks(fc...
| 11.6% filelog.py: read line 1132: return
self._filelog.read(s...
| 11.6% revlog.py: revision line 48: t =
self.revision(node)
| 8.0% revlog.py: _chunks line 1313: bins =
self._chunks(chain, ...
| 8.0% revlog.py: decompress line 1232:
ladd(decomp(buffer(data, ch...
---
Sample count: 11546
Total time: 38.470000 seconds
This makes followlines() extremely slow on large repos, especially with files
with many revisions.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Mercurial-devel
mailing list