[PATCH 4 of 4] dirstate: speed up case collision checking

Bryan O'Sullivan bos at serpentine.com
Mon Jun 25 16:43:18 CDT 2012


On Mon, Jun 25, 2012 at 9:56 AM, Joshua Redstone <joshua.redstone at fb.com>wrote:

> The two optimizations in this patch series reduce add time by over 50%.
>

That's pretty sweet.


> I was following the pattern used for dirs().  I can get rid of
> sortedfiles()
>

No need, I only noticed after the fact that you were using it in a later
patch.


> Given that dirstate._finddirs is reasoning about '/' as a separator, I
> presume something converts to '/' internally.
>

Looks like it.


>   You're probably still right about os.path routines not being portable,
> though.  I'll get rid of them.
>

os.path.dirname is definitely not safe to use here. os.path.commonprefix,
on the other hand, *is* safe because it doesn't care about os.sep.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20120625/26e5bfbc/attachment.html>


More information about the Mercurial-devel mailing list