[PATCH 3 of 5 STABLE v2] revset: more optimally handle __sub__ (issue4352)

Pierre-Yves David pierre-yves.david at ens-lyon.org
Tue Sep 16 22:42:07 CDT 2014



On 09/08/2014 02:59 PM, Gregory Szorc wrote:
> # HG changeset patch
> # User Gregory Szorc <gregory.szorc at gmail.com>
> # Date 1410195265 25200
> #      Mon Sep 08 09:54:25 2014 -0700
> # Node ID b2a51ed00298036887b54108e3c7faa10a2d8417
> # Parent  3e8808bd267f9c2f6a650247a3a4ba926ee6c624
> revset: more optimally handle __sub__ (issue4352)

Ok so the regression here (before this patches) is that the substraction 
X - Y is done by doing a Y membership testing for all element in the X 
set. If the membership testing is expensive to do, this slow down 
significantly compared to doing the whole computation and using set 
membership testing.

Before lazy revset we were doing the full computation and set membership 
test. This changeset reinstate this in the substraction case.

This is good for set that are cheap to compute but for more expensive 
revset (like author), the membership testing on a few element may be 
more effective.

The improvement added in another patches is doing full traversal of the 
X too.

So I'm not sure this is the right fix and will poke at it a bit.

We need to find an approriate fix on stable for the mozilla (and other 
gigantic repo) people.

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list