cmdutil: store a local ref to repo.hiddenrevs in getgraphlogrevs
On a repository with over 400,000 changesets, this speeds graphlog up by
around 0.03 seconds (~20% with a small limit).
--- a/mercurial/cmdutil.py Fri Dec 28 14:46:58 2012 -0800
+++ b/mercurial/cmdutil.py Fri Dec 28 16:24:36 2012 -0800
@@ -1453,7 +1453,8 @@
if not opts.get('hidden'):
# --hidden is still experimental and not worth a dedicated revset
# yet. Fortunately, filtering revision number is fast.
- revs = (r for r in revs if r not in repo.hiddenrevs)
+ hiddenrevs = repo.hiddenrevs
+ revs = (r for r in revs if r not in hiddenrevs)
else:
revs = iter(revs)
return revs, expr, filematcher