Mercurial > hg-stable
changeset 20448:92f6f2db3cf4
revset: added lazyset implementation to author revset
Performance benchmarking:
$ time hg log -qr "first(author(mpm))"
0:9117c6561b0b
real 0m3.486s
user 0m3.317s
sys 0m0.077s
$ time ./hg log -qr "first(author(mpm))"
0:9117c6561b0b
real 0m0.551s
user 0m0.295s
sys 0m0.072s
author | Lucas Moscovicz <lmoscovicz@fb.com> |
---|---|
date | Wed, 29 Jan 2014 09:22:31 -0800 |
parents | abb91b74f758 |
children | ad2f1512eaa6 |
files | mercurial/revset.py |
diffstat | 1 files changed, 1 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/revset.py Wed Jan 29 09:04:03 2014 -0800 +++ b/mercurial/revset.py Wed Jan 29 09:22:31 2014 -0800 @@ -347,8 +347,7 @@ # i18n: "author" is a keyword n = encoding.lower(getstring(x, _("author requires a string"))) kind, pattern, matcher = _substringmatcher(n) - return baseset([r for r in subset if - matcher(encoding.lower(repo[r].user()))]) + return lazyset(subset, lambda x: matcher(encoding.lower(repo[x].user()))) def bisect(repo, subset, x): """``bisect(string)``