hg diff and update taking forever

Michael P. Soulier msoulier at digitaltorque.ca
Sun May 13 20:48:28 UTC 2007


On 13/05/07 Matt Mackall said:

> My first response would be to run strace.
> 
> If you don't have strace, you can run hg <cmd> --traceback, then
> interrupting it will give a back trace that may provide some hint of
> what it's doing.

I don't have strace, it's a virtual server with limited tools. 

[pawsitiveapproach][/var/www/papproach]$ . ~/.profile
[pawsitiveapproach][/var/www/papproach]$ hg --traceback --lsprof diff
   CallCount     Total(s)    Inline(s) module:lineno(function)
         694     15.6325     15.6325   <posix.lstat>
           8      1.1643      1.1643   <method 'sort' of 'list' objects>
           4      0.2517      0.2517   <posix.listdir>
         680     17.2374      0.0905   mercurial.dirstate:397(findfiles)
        +693     15.6325     15.6325   +<posix.lstat>
          +4      1.1643      1.1643   +<method 'sort' of 'list' objects>
          +4      0.2517      0.2517   +<posix.listdir>
       +1400      0.0608      0.0584   +posixpath:56(join)
        +705      0.0265      0.0050   +mercurial.dirstate:385(imatch)
        1406      0.0608      0.0584   posixpath:56(join)
       +1407      0.0014      0.0014   +<method 'startswith' of 'str' objects>
       +1385      0.0010      0.0010   +<method 'endswith' of 'str' objects>
           1      0.0099      0.0083   socket:43(<module>)
          +1      0.0013      0.0012   +socket:148(_socketobject)
          +2      0.0002      0.0001   +os:35(_get_exports_list)
          +1      0.0000      0.0000   +socket:199(_fileobject)
          +2      0.0000      0.0000   +<method 'extend' of 'list' objects>
          +1      0.0000      0.0000   +socket:138(_closedsocket)
         705      0.0177      0.0057   mercurial.util:478(<lambda>)
        +692      0.0085      0.0030   +mercurial.util:433(buildfn)
        +705      0.0023      0.0023   +<method 'endswith' of 'str' objects>
        +705      0.0006      0.0006   +mercurial.util:234(always)
        +705      0.0005      0.0005   +mercurial.util:472(<lambda>)
         692      0.0055      0.0055   <built-in method match>
         705      0.0265      0.0050   mercurial.dirstate:385(imatch)
        +705      0.0177      0.0057   +mercurial.util:478(<lambda>)
        +703      0.0039      0.0030   +mercurial.dirstate:100(ignore)
          22      0.0177      0.0045   <__import__>
          +1      0.0099      0.0083   +socket:43(<module>)
          +1      0.0005      0.0004   +mercurial.mdiff:8(<module>)
          +1      0.0003      0.0003   +bisect:1(<module>)
          +1      0.0003      0.0002   +mercurial.lock:8(<module>)
          +1      0.0015      0.0002   +sha:6(<module>)
Traceback (most recent call last):
  File
"/home/pawsitiveapproach/python2.5/lib/python2.5/site-packages/mercurial/commands.py",
line 3216, in dispatch
    return d()
  File
"/home/pawsitiveapproach/python2.5/lib/python2.5/site-packages/mercurial/commands.py",
line 3182, in <lambda>
    d = lambda: func(u, repo, *args, **cmdoptions)
  File
"/home/pawsitiveapproach/python2.5/lib/python2.5/site-packages/mercurial/commands.py",
line 1030, in diff
    opts=patch.diffopts(ui, opts))
  File
"/home/pawsitiveapproach/python2.5/lib/python2.5/site-packages/mercurial/patch.py",
line 463, in diff
    changes = repo.status(node1, node2, files, match=match)[:5]
  File
"/home/pawsitiveapproach/python2.5/lib/python2.5/site-packages/mercurial/localrepo.py",
line 861, in status
    list_ignored, list_clean)
  File
"/home/pawsitiveapproach/python2.5/lib/python2.5/site-packages/mercurial/dirstate.py",
line 486, in status
    for src, fn, st in self.statwalk(files, match, ignored=list_ignored):
  File
"/home/pawsitiveapproach/python2.5/lib/python2.5/site-packages/mercurial/dirstate.py",
line 462, in statwalk
    sorted_ = [ x for x in findfiles(f) ]
  File
"/home/pawsitiveapproach/python2.5/lib/python2.5/site-packages/mercurial/dirstate.py",
line 421, in findfiles
    st = os.lstat(p)
KeyboardInterrupt
interrupted!

It seems to be spending a lot of time in lstat(). 

Mike
-- 
Michael P. Soulier <msoulier at digitaltorque.ca>
"Any intelligent fool can make things bigger and more complex... It
takes a touch of genius - and a lot of courage to move in the opposite
direction." --Albert Einstein
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20070513/e953c23a/attachment-0001.asc>


More information about the Mercurial mailing list