Speed on Windows for big repos
Matt Mackall
mpm at selenic.com
Mon Jan 28 00:56:31 UTC 2008
On Sun, 2008-01-27 at 18:52 -0600, Matt Mackall wrote:
> On Mon, 2008-01-28 at 01:09 +0100, Adrian Buehlmann wrote:
> > > hg clone --noupdate --time --lsprof http://www.selenic.com/hg/ mercurial
> > requesting all changes
> > adding changesets
> > adding manifests
> > adding file changes
> > added 5930 changesets with 11128 changes to 800 files
> > CallCount Total(s) Inline(s) module:lineno(function)
> > 3859 105.8043 105.8043 <win32file.FlushFileBuffers>
>
...
> So what do we need to do for flush() here? Probably nothing at all. As
> far as I can tell, WriteFile() is more or less analogous to write(2) in
> UNIX, which doesn't have any application-side buffering so flush is
> unneeded.
And here's a patch:
diff -r 359036c4e09e mercurial/util_win32.py
--- a/mercurial/util_win32.py Fri Jan 25 17:10:35 2008 -0600
+++ b/mercurial/util_win32.py Sun Jan 27 18:56:12 2008 -0600
@@ -317,10 +317,7 @@
self.closed = True
def flush(self):
- try:
- win32file.FlushFileBuffers(self.handle)
- except pywintypes.error, err:
- raise WinIOError(err)
+ pass
def truncate(self, pos=0):
try:
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial-devel
mailing list