[PATCH] Increase performance on Windows by up to 2x

Bryan O'Sullivan bos at serpentine.com
Tue Mar 31 17:15:07 CDT 2009


On Mon, Mar 30, 2009 at 4:35 PM, Matt Mackall <mpm at selenic.com> wrote:


> > Python uses regular stdio buffered I/O for file objects. I assume that
> > a win32 read amounts to a system call, so it's naturally more
> > expensive to do a few of those interleaved with a seek or two than one
> > bigger one that obviates the later need for a seek.
>
> Yeah, we can fix that. The only reason not to read all of a .i file is
> if it's really big. So we should read, say, the first 1M
> unconditionally.
>

But then it would be necessary to implement some kind of buffer management
that would essentially duplicate the buffering provided by file objects,
only presumably more slowly because it would be in pure Python? Perhaps I'm
missing something.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://selenic.com/pipermail/mercurial-devel/attachments/20090331/2e447759/attachment.htm 


More information about the Mercurial-devel mailing list