revset: optimize for destination() being "inefficient"
authorMads Kiilerich <madski@unity3d.com>
Mon, 17 Oct 2016 19:48:36 +0200
changeset 30205 b4074417b661
parent 30204 1894c830ee74
child 30206 d105195436c0
revset: optimize for destination() being "inefficient" destination() will scan through the whole subset and read extras for each revision to get its source.
mercurial/revset.py
--- a/mercurial/revset.py	Tue Oct 11 04:39:47 2016 +0200
+++ b/mercurial/revset.py	Mon Oct 17 19:48:36 2016 +0200
@@ -2595,7 +2595,7 @@
         f = getsymbol(x[1])
         wa, ta = _optimize(x[2], small)
         if f in ('author', 'branch', 'closed', 'date', 'desc', 'file', 'grep',
-                 'keyword', 'outgoing', 'user'):
+                 'keyword', 'outgoing', 'user', 'destination'):
             w = 10 # slow
         elif f in ('modifies', 'adds', 'removes'):
             w = 30 # slower