dirstate and improving the performance of hg-add

Joshua Redstone joshua.redstone at fb.com
Wed Jun 13 18:13:41 CDT 2012


I'm still working on fleshing this out.  After looking at how _dirs is used, I think it may not make sense to try to kill the whole thing.
I'm focusing on the hg-add code specifically and playing around with the sorted list because it's simple to construct.
Oh, to answer your other question, I would not be modifying _map, and a _sortledlist thingy would have @propertycache.
I'm still exploring.
Josh

From: Bryan O'Sullivan <bos at serpentine.com<mailto:bos at serpentine.com>>
Date: Monday, June 11, 2012 6:20 PM
To: Joshua Redstone <joshua.redstone at fb.com<mailto:joshua.redstone at fb.com>>
Cc: "mercurial-devel at selenic.com<mailto:mercurial-devel at selenic.com>" <mercurial-devel at selenic.com<mailto:mercurial-devel at selenic.com>>
Subject: Re: dirstate and improving the performance of hg-add

On Mon, Jun 11, 2012 at 12:08 PM, Joshua Redstone <joshua.redstone at fb.com<mailto:joshua.redstone at fb.com>> wrote:
> I've been looking into how to improve the performance of hg-add and wanted to get people's thoughts on removing dirstate._dirs and adding a sorted list of entries to dirstate to mirror the stuff in dirstate._map.

I don't follow how this would be supposed to work. Can you flesh the idea out some more? I take it you're referring to replacing dirstate._map with a different data type while getting rid of dirstate._dirs. Off the top of my head, a sorted list seems like a not-great choice compared to a tree due to its poor insertion performance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20120613/0c076bd7/attachment.html>


More information about the Mercurial-devel mailing list