[issue952] Slow clone on Windows

Adrian Buehlmann mercurial-bugs at selenic.com
Tue Jan 29 08:12:49 CST 2008


New submission from Adrian Buehlmann <adrian at cadifra.com>:

As discussed on mercurial-devel in Jan 2008 (pointers included below):

Relative speed of "hg clone" on Windows compared to Linux is very bad for
Mercurial 0.9.5 for big repos, because a unneded very costly call to
win32file.FlushFileBuffers() is done in mercurial/util_win32.py:

class posixfile_nt(object):
...
    def flush(self):
        try:
            win32file.FlushFileBuffers(self.handle)
        except pywintypes.error, err:
            raise WinIOError(err)

Suggested change (by mpm) is to simply do nothing:

     def flush(self):
         pass

See mailing list thread starting at:
http://selenic.com/pipermail/mercurial-devel/2008-January/004513.html

mpm's analysis:
http://selenic.com/pipermail/mercurial-devel/2008-January/004528.html

Suggested patch by mpm:
http://selenic.com/pipermail/mercurial-devel/2008-January/004529.html

Speed improvement achieved by that patch on a Windows XP SP2, 2.4 GHz Pentium 4,
1 GB RAM (see
http://selenic.com/pipermail/mercurial-devel/2008-January/004541.html ):

'''
> hg clone --time --noupdate --pull netbeans-main netbeans-clone
requesting all changes
adding changesets
adding manifests
adding file changes
added 64894 changesets with 325167 changes to 74741 files
Time: real 984.002 secs (user 327.484+0.000 sys 455.719+0.000)
'''

Without the patch:

'''
> hg clone --time --noupdate --pull netbeans-main netbeans-clone
requesting all changes
adding changesets
adding manifests
adding file changes
added 64894 changesets with 325167 changes to 74741 files
Time: real 4151.165 secs (user 318.266+0.000 sys 440.734+0.000)
'''

----------
messages: 5022
nosy: abuehl, mpm, pmezard
priority: bug
status: chatting
title: Slow clone on Windows
topic: performance, windows

____________________________________________________
Mercurial issue tracker <mercurial-bugs at selenic.com>
<http://www.selenic.com/mercurial/bts/issue952>
____________________________________________________



More information about the Mercurial-devel mailing list