Speed on Windows for big repos

Adrian Buehlmann adrian at cadifra.com
Sun Jan 27 18:09:29 CST 2008


I did some --lsprof using repo http://www.selenic.com/hg/.

'''
Mercurial on Windows XP SP2, 2.4 GHz Pentium 4, 1 GB RAM, ATA-HD using NTFS
Sampled by Adrian Buehlmann on 2008-01-28
------------------------------------------------------------------------------

 > ver
Microsoft Windows XP [Version 5.1.2600]

 > hg version
Mercurial Distributed SCM (version 02884e56c217+win32extras)

 > 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>
         4696     37.9334     37.9334   <method 'recv' of '_socket.socket' objects>
        27104      5.4927      5.4927   <zlib.compress>
          802    160.4870      1.6750   <mercurial\revlog.pyc>:1128(addgroup)
       +57681      1.5920      0.6826   +<mercurial\util_win32.pyc>:277(write)
        +3759      4.4434      0.3680   +<mercurial\revlog.pyc>:1018(_addrevision)
        +3759      2.9183      0.2492   +<mercurial\revlog.pyc>:919(revision)
       +22184      4.4959      0.2055   +<mercurial\revlog.pyc>:65(compress)
       +22986      0.2982      0.1534   +<mercurial\revlog.pyc>:534(end)
         7421      1.6561      1.6561   <win32file.CreateFile>
        83773      2.3729      0.9866   <mercurial\util_win32.pyc>:277(write)
       +60247      0.6733      0.6733   +<win32file.WriteFile>
       +68909      0.5032      0.5032   +<win32file.SetFilePointer>
      +144020      0.2098      0.2098   +<len>
            1      0.8228      0.8228   <<string>>:1(connect)
        60247      0.6733      0.6733   <win32file.WriteFile>
       439171      0.6672      0.6672   <len>
          +10      0.0000      0.0000   +<sre_parse.pyc>:132(__len__)
        89646      0.5939      0.5939   <win32file.SetFilePointer>
Time: real 166.533 secs (user 8.625+0.000 sys 13.000+0.000)


 > hg clone --pull --noupdate --time --lsprof mercurial mercurial-cloned
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    110.3833    110.3833   <win32file.FlushFileBuffers>
        27104      5.4330      5.4330   <zlib.compress>
        15087      3.0310      3.0310   <win32file.ReadFile>
        19933      2.2309      2.2309   <win32file.CreateFile>
          802    143.4826      1.7359   <mercurial\revlog.pyc>:1128(addgroup)
       +57681      1.5895      0.6773   +<mercurial\util_win32.pyc>:277(write)
        +3759      4.6457      0.3835   +<mercurial\revlog.pyc>:1018(_addrevision)
        +3759      2.8817      0.2409   +<mercurial\revlog.pyc>:919(revision)
       +22184      4.3611      0.2089   +<mercurial\revlog.pyc>:65(compress)
       +22986      0.3035      0.1583   +<mercurial\revlog.pyc>:534(end)
        55787      5.1336      1.2139   <mercurial\revlog.pyc>:869(chunk)
       +55787      0.2582      0.2582   +<mercurial\revlog.pyc>:532(start)
       +55787      1.4169      0.2392   +<mercurial\revlog.pyc>:94(decompress)
       +55787      0.1172      0.1172   +<mercurial\revlog.pyc>:536(length)
        +2709      2.0280      0.1078   +<mercurial\revlog.pyc>:870(loadcache)
       +55709      0.0869      0.0869   +<len>
        42454      1.1778      1.1778   <zlib.decompress>
        48375     15.3070      0.9898   <mercurial\util.pyc>:1437(read)
       +71362     13.8145      0.3262   +<mercurial\localrepo.pyc>:1816(gengroup)
      +168323      0.2525      0.2525   +<len>
       +71573      0.2102      0.2102   +<method 'write' of 'cStringIO.StringO' 
objects>
         +212      0.0283      0.0283   +<method 'getvalue' of 
'cStringIO.StringO' objects>
         +212      0.0098      0.0039 
+<mercurial\demandimport.pyc>:71(__getattribute__)
        83773      2.3650      0.9762   <mercurial\util_win32.pyc>:277(write)
       +60247      0.6773      0.6773   +<win32file.WriteFile>
       +68909      0.5020      0.5020   +<win32file.SetFilePointer>
      +144020      0.2095      0.2095   +<len>
       645476      0.9716      0.9716   <len>
Time: real 146.395 secs (user 13.297+0.000 sys 20.531+0.000)
'''

Available at
http://www.selenic.com/mercurial/wiki/index.cgi/AdrianBuehlmann?action=AttachFile&do=view&target=hg-profile-2008-01-28-001-abuehl.txt
which contains an additional "hg verify"


More information about the Mercurial-devel mailing list