D4134: perf: call _generatechangelog() instead of group()
indygreg (Gregory Szorc)
phabricator at mercurial-scm.org
Thu Aug 9 14:15:50 EDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGa1f694779b2f: perf: call _generatechangelog() instead of group() (authored by indygreg, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D4134?vs=10005&id=10141
REVISION DETAIL
https://phab.mercurial-scm.org/D4134
AFFECTED FILES
contrib/perf.py
CHANGE DETAILS
diff --git a/contrib/perf.py b/contrib/perf.py
--- a/contrib/perf.py
+++ b/contrib/perf.py
@@ -663,21 +663,20 @@
By default, all revisions are added to the changegroup.
"""
cl = repo.changelog
- revs = [cl.lookup(r) for r in repo.revs(rev or 'all()')]
+ nodes = [cl.lookup(r) for r in repo.revs(rev or 'all()')]
bundler = changegroup.getbundler(version, repo)
- def lookup(node):
- # The real bundler reads the revision in order to access the
- # manifest node and files list. Do that here.
- cl.read(node)
- return node
-
def d():
- for chunk in bundler.group(revs, cl, lookup):
+ state, chunks = bundler._generatechangelog(cl, nodes)
+ for chunk in chunks:
pass
timer, fm = gettimer(ui, opts)
- timer(d)
+
+ # Terminal printing can interfere with timing. So disable it.
+ with ui.configoverride({('progress', 'disable'): True}):
+ timer(d)
+
fm.end()
@command('perfdirs', formatteropts)
To: indygreg, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list