[patch 01/10] dirstate walking optimizations

Chris Mason mason at suse.com
Wed Aug 10 07:44:31 CDT 2005


Hello everyone,

Here's an updated version of the dirstate optimization.  Before, both 
dirstate.changes and dirstate.walk would make a copy of the map.  I've 
changed dirstate.changes to pass the map it creates to dirstate.walk.

This required a small change to the traverse function so that it doesn't 
delete items from the map anymore.

Also, dirstate.filterfiles now optimistically assumes each file passed exists 
in the map.  This is the common case, and brings the time for hg diff 
Makefile down from .3s to .2s.  Not a big difference for that one call, but 
the total time to apply 600 patches goes down from 2m to 1m30s.

-chris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dirstate-opt-4
Type: text/x-diff
Size: 4297 bytes
Desc: not available
Url : http://www.selenic.com/pipermail/mercurial/attachments/20050810/4bfb732e/dirstate-opt-4.bin


More information about the Mercurial mailing list