[PATCH evolve-ext] inhibit: improve transaction marker perf

Durham Goode durham at fb.com
Sat Nov 7 19:23:00 CST 2015


On 11/7/15 5:20 PM, Durham Goode wrote:
> # HG changeset patch
> # User Durham Goode <durham at fb.com>
> # Date 1446945001 28800
> #      Sat Nov 07 17:10:01 2015 -0800
> # Node ID 7c680f209f7af35c7c476eecc2f9eec13b32ad62
> # Parent  48547b4c77defdd17c670b1eb0eb94272edf0207
> inhibit: improve transaction marker perf
>
> The old algorithm was a revset "::X and obsolete()". This was inefficient because
> it requires walking all the way down the ancestor chain (since the revset did
> not know it could stop walking at public nodes).
>
> The new algorithm uses changelog.ancestors() directly and provides a function to
> stop the iteration when we reach a public node. During a commit to a repo with
> hundreds of thousands of commits, this change reduces the inhibitmarkers time
> from 1.5 seconds to effectively 0 seconds.
>
This patch is dependent on the pending "ancestors: add stopfunc to 
revlog.ancestors" patch being accepted into core.


More information about the Mercurial-devel mailing list