[PATCH 4 of 4] revset: do not nest addset by "addset + other" (issue4565)

Pierre-Yves David pierre-yves.david at ens-lyon.org
Wed May 20 23:26:35 CDT 2015



On 05/19/2015 07:18 AM, Yuya Nishihara wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya at tcha.org>
> # Date 1426409247 -32400
> #      Sun Mar 15 17:47:27 2015 +0900
> # Node ID 72e8a0b846616a92781beda44eab8d6c39c91933
> # Parent  9996864f9e14a826ebe20df3a48905a662fe8eba
> revset: do not nest addset by "addset + other" (issue4565)

There is good idea in this series and some interesting win.

However, this is adding significant more complexity and special casing 
to the code. I'm feeling very uncomfortable about that since the 
smartset class are already "not simple". I feel like we'll need to start 
converting the code object to C class soon and every special case here 
(eg: new class). There is also some more generic optimisation that could 
be worthwhile. We should meet on IRC/video call to discuss the situation 
in details

Here is the nice thing I see in your series:
- The logarithmic combination used for the sorting,
- The creation of a wider object when something is added to a addset 
(wider instead of deeper)

There is couple of generic stuff that are worth looking at too:
- The optimizer could directly build a balanced tree for addition 
instead of making it pure depth.
- We could directly performs add operation for smartset that are already 
all known (baseset + baseset, the case that actually interest use for 
both currently open issue)

Also
- We should also determine if it is safe to alter smartset in place. 
This could simplify multiple things.

When and how could we discuss this?

(This is not a series, rejection, some of it may be taken as is after 
such discussion)

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list