# HG changeset patch # User Siddharth Agarwal # Date 1356740676 28800 # Node ID 0dcc77b271b93ad6f4a6729d8d8cb8051b7086b0 # Parent ae663cba9a8d9cb1ca7f54d436136ff407af7793 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). diff -r ae663cba9a8d -r 0dcc77b271b9 mercurial/cmdutil.py --- 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