Mercurial > public > mercurial-scm > hg
comparison mercurial/revset.py @ 30205:b4074417b661
revset: optimize for destination() being "inefficient"
destination() will scan through the whole subset and read extras for each
revision to get its source.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Mon, 17 Oct 2016 19:48:36 +0200 |
parents | cdef35b38026 |
children | 5ee944b9c750 |
comparison
equal
deleted
inserted
replaced
30204:1894c830ee74 | 30205:b4074417b661 |
---|---|
2593 return w, (op, x[1], t) | 2593 return w, (op, x[1], t) |
2594 elif op == 'func': | 2594 elif op == 'func': |
2595 f = getsymbol(x[1]) | 2595 f = getsymbol(x[1]) |
2596 wa, ta = _optimize(x[2], small) | 2596 wa, ta = _optimize(x[2], small) |
2597 if f in ('author', 'branch', 'closed', 'date', 'desc', 'file', 'grep', | 2597 if f in ('author', 'branch', 'closed', 'date', 'desc', 'file', 'grep', |
2598 'keyword', 'outgoing', 'user'): | 2598 'keyword', 'outgoing', 'user', 'destination'): |
2599 w = 10 # slow | 2599 w = 10 # slow |
2600 elif f in ('modifies', 'adds', 'removes'): | 2600 elif f in ('modifies', 'adds', 'removes'): |
2601 w = 30 # slower | 2601 w = 30 # slower |
2602 elif f == "contains": | 2602 elif f == "contains": |
2603 w = 100 # very slow | 2603 w = 100 # very slow |