[PATCH 3 of 3] revset: improve roots revset performance

Matt Mackall mpm at selenic.com
Wed Apr 2 16:39:06 CDT 2014


On Mon, 2014-03-31 at 19:49 -0700, Durham Goode wrote:
> # HG changeset patch
> # User Durham Goode <durham at fb.com>
> # Date 1396307014 25200
> #      Mon Mar 31 16:03:34 2014 -0700
> # Node ID 157d96db8eaf11d343017477847ba8719d52eeca
> # Parent  aa93084956fd536092f56eb2347dcb723e153d94
> revset: improve roots revset performance

These are queued for default, thanks.

> This actually introduces a regression in 'roots(all())' (0.2s to 0.26s) since
> we're now using spansets, which are slightly slower to do containment checks on.
> I believe this trade off is worth it, since it makes the revset O(number of
> args) instead of O(size of repo).

I'm pretty sure there are now a bunch of new opportunities for
micro-optimization in here which can win back these losses. 

But yes, when the dust settles, we're going to have a bit of a mixed bag
of regressions vs improvements here since we've changed basically
everything. But I think on the whole, we're going to have a bunch of
large wins weighing against small losses.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list