comparison mercurial/revset.py @ 12351:b913232d13c1

revsets: reduce cost of outgoing in the optimizer
author Matt Mackall <mpm@selenic.com>
date Mon, 20 Sep 2010 16:40:36 -0500
parents 11db6fa2961e
children 4f8067c94729
comparison
equal deleted inserted replaced
12350:e7e3b0618d8d 12351:b913232d13c1
560 wb, tb = optimize(x[2], small) 560 wb, tb = optimize(x[2], small)
561 return wa + wb, (op, ta, tb) 561 return wa + wb, (op, ta, tb)
562 elif op == 'func': 562 elif op == 'func':
563 f = getstring(x[1], _("not a symbol")) 563 f = getstring(x[1], _("not a symbol"))
564 wa, ta = optimize(x[2], small) 564 wa, ta = optimize(x[2], small)
565 if f in "grep date user author keyword branch file": 565 if f in "grep date user author keyword branch file outgoing":
566 w = 10 # slow 566 w = 10 # slow
567 elif f in "modifies adds removes outgoing": 567 elif f in "modifies adds removes":
568 w = 30 # slower 568 w = 30 # slower
569 elif f == "contains": 569 elif f == "contains":
570 w = 100 # very slow 570 w = 100 # very slow
571 elif f == "ancestor": 571 elif f == "ancestor":
572 w = 1 * smallbonus 572 w = 1 * smallbonus