Mercurial > hg-stable
changeset 25567:f140d6207cca
revset: use parentsets.min in _children
As stated in the comment, using the smartset 'min' will give more opportunity to
be smart. It give a small but significant boost to the performance. Most of the
time is still spend doing the actual computation but at least we can scrap some
performance when it makes sense.
revset #0: roots(0:tip)
plain
0) 0.046600
1) 0.044109 94%
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Thu, 11 Jun 2015 19:02:24 -0700 |
parents | 15412bba5a68 |
children | c1ff82daed62 |
files | mercurial/revset.py |
diffstat | 1 files changed, 1 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/revset.py Thu Jun 11 11:42:46 2015 -0700 +++ b/mercurial/revset.py Thu Jun 11 19:02:24 2015 -0700 @@ -622,9 +622,7 @@ return baseset() cs = set() pr = repo.changelog.parentrevs - # XXX this should be 'parentset.min()' assuming 'parentset' is a smartset - # (and if it is not, it should.) - minrev = min(parentset) + minrev = parentset.min() for r in narrow: if r <= minrev: continue