Mercurial > hg
changeset 18170:0dcc77b271b9
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).
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Fri, 28 Dec 2012 16:24:36 -0800 |
parents | ae663cba9a8d |
children | 9d350f2d9458 |
files | mercurial/cmdutil.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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