[PATCH 0 of 4] spped up hg-add
Matt Mackall
mpm at selenic.com
Tue Jun 26 04:04:02 UTC 2012
On Fri, 2012-06-22 at 13:49 -0700, Joshua Redstone wrote:
> This patch series speeds up hg-add of a single file on a large repo from about
> 2.5 seconds down to 0.75 seconds. It works by introducing a _sortedfiles
> property into dirstate and some lazy caching into the case collision checker.
>
> After the optimization, it looks like about 30% of time (say 0.3 seconds) is
> spent copying dirstate._map and filtering out entries of type 'r'. Sorting
> the resulting list is negligable in time, as is the log-n searching the list
> and even the o(n) insertion to update the list (probably because the constant
> is so small?).
That certainly sounds promising.
Can we get a comparison of how long adding 50k files to an empty repo
takes before and after this optimization? Not an everyday case, but
going O(N^2) here would be unfortunate for people evaluating hg.
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial-devel
mailing list