[PATCH 4/5] manifest.add speedups

Chris Mason mason at suse.com
Wed Jun 22 20:25:45 UTC 2005


On Wednesday 15 June 2005 13:00, Chris Mason wrote:
> Profiling shows that manifest.add() is consuming quite a bit of CPU time. 
> This patch uses a binary search into the old manifest file to find the best
> location to add/modify/remove items in the addlist.
>
> It provides better commit speeds on large trees because the number of items
> that need to be found or changed is usually much smaller than the size of
> the addlist.

I started to add a C extension to improve things further, but it looks as 
though python already ships with a C extension of bisect.  So, I'm not sure 
how much faster I can really make this.  I could change manifest.add to 
generate the delta at the same time, but it isn't immediately obvious to me 
that will make a huge difference.

Matt, how do you feel about the manifest.add patch, or places that deserve 
tuning?

-chris



More information about the Mercurial mailing list