[PATCH] dirstate: track non-normal files separately

Matt Mackall mpm at selenic.com
Fri Dec 11 15:49:26 CST 2015


On Wed, 2015-12-09 at 15:56 -0800, Laurent Charignon wrote:
> # HG changeset patch
> # User Laurent Charignon <lcharignon at fb.com>
> # Date 1449705375 28800
> #      Wed Dec 09 15:56:15 2015 -0800
> # Branch stable
> # Node ID 04249d53c997f653ae3488992a49f4df09c6a8b6
> # Parent  f5e8cb813a4d5c0665c7e144d96810b4763c42d1
> dirstate: track non-normal files separately
> 
> This patch introduces a new property of the dirstate "_nonnormal". It
> is a dict
> containing the non-normal files, populated when we parse the
> dirstate.
> 
> Thanks to this property we can shorten the time it takes to run `hg
> status`
> as we don't need to walk through all the files to find the non-normal 
> files.
> With another patch on hgwatchman to use that property, on our big
> repos (the
> dirstate takes about ~100Mb on disk), hg status goes from 0.9s to 0.6
> seconds
> (10 run average) with this patch.

Can I strongly encourage you to use or extend the perf extension
instead of whatever form of benchmarking you're doing? It's much more
precise and repeatable.

-- 
Mathematics is the supreme nostalgia of our time.



More information about the Mercurial-devel mailing list