Issue952

Title Slow clone on Windows
Priority bug Status resolved
Superseder Nosy List abuehl, dlipin, jglick, mpm, pmezard
Assigned To Topics performance, windows

Created on 2008-01-29.14:12:49 by abuehl, last changed 2008-02-01.20:58:33 by abuehl.

Messages
msg5077 (view) Author: abuehl Date: 2008-02-01.20:58:28
Resolved in TortoiseHg-0.3 which was released 2008-02-01 (available at
http://sourceforge.net/project/showfiles.php?group_id=199155 )

'''
> hg version
Mercurial Distributed SCM (version 9f1e6ab76069+tortoisehg)
'''
msg5073 (view) Author: abuehl Date: 2008-02-01.08:33:58
Merged in main repo by mpm on Thu Jan 31 14:44:00 2008 -0600:
http://www.selenic.com/hg/rev/821fc5c0656c
msg5050 (view) Author: abuehl Date: 2008-01-31.09:49:50
Resolved in hg-stable by mpm on Jan 30 17:30:34 2008,
http://www.selenic.com/repo/hg-stable/rev/0973501e5f4a
msg5022 (view) Author: abuehl Date: 2008-01-29.14:12:48
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)
'''
History
Date User Action Args
2008-02-01 20:58:33abuehlsetstatus: testing -> resolved
nosy: mpm, pmezard, jglick, abuehl, dlipin
messages: + msg5077
2008-02-01 08:33:58abuehlsetnosy: mpm, pmezard, jglick, abuehl, dlipin
messages: + msg5073
2008-01-31 09:49:50abuehlsetstatus: chatting -> testing
nosy: mpm, pmezard, jglick, abuehl, dlipin
messages: + msg5050
2008-01-30 11:14:20dlipinsetnosy: + dlipin
2008-01-29 16:17:08jglicksetnosy: + jglick
2008-01-29 14:12:49abuehlcreate