Excessive time spent in CloseFile on Windows

Gregory Szorc gregory.szorc at gmail.com
Sun Sep 27 02:13:37 CDT 2015


On Sun, Sep 27, 2015 at 12:07 AM, Gregory Szorc <gregory.szorc at gmail.com>
wrote:

> With the current implementation of revlogs as of my latest patch, we'll
> reopen revlogs if and only if a new delta chain is started. And every new
> delta chain appears to incur an I/O pause in the 1-100ms range on Windows.
> These add up, as my recent followup post documenting a 5x changelog speedup
> due to avoiding reopens after every revision addition showed.
>
> FWIW in the commit message of the "avoid flush" patch I sent to the list
> earlier, I said it resulted in no speedup on Windows. I only based that
> claim on the hg repository. I should probably retest with mozilla-central
> to test my theory about CloseFile after writes being the source of
> slowdowns...
>

Actually, that patch shouldn't change the number of file opens and closes:
it only reduces the number of writes. And since it appears Windows defers
expensive write activity to file close time, I wouldn't expect write
syscall count reduction to impact overall time that much. Reducing the
number of file closes after write (which is what changelog writing was
doing before a few weeks ago) is what I believe we should focus on.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20150927/dccf6e6b/attachment.html>


More information about the Mercurial-devel mailing list