[PATCH V2] revset: improve head revset performance

Matt Mackall mpm at selenic.com
Thu Mar 13 16:50:56 CDT 2014


On Thu, 2014-03-13 at 14:48 -0700, Durham Goode wrote:
> # HG changeset patch
> # User Durham Goode <durham at fb.com>
> # Date 1394743641 25200
> #      Thu Mar 13 13:47:21 2014 -0700
> # Node ID ee115a100278ac12cc4fd712f536518fa78e009b
> # Parent  1cd5bff45db28150d7c140be493fe851e6560f27
> revset: improve head revset performance
> 
> Previously the head() revset would iterate over every item in the subset and
> check if it was a head.  Since the subset is often the entire repo, this was
> slow on large repos. Now we iterate over each item in the head list and check if
> it's in the subset, which results in much less work.
> 
> hg log -r 'head()' on a large repo:
> Before: 0.95s
> After: 0.28s

Shiny, queued for default.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list