Mercurial Performance Problem

Matt Mackall mpm at selenic.com
Wed May 16 14:23:26 UTC 2007


On Wed, May 16, 2007 at 10:17:26AM -0400, Michael P. Soulier wrote:
> On 16/05/07 Guido Ostkamp said:
> 
> > Hello,
> > 
> > unfortunately I have quite a performance problem with Mercurial.
> > My mercurial version is ba22e867cb23+20070510.
> > 
> > I changed a file in my large repository, then I tried a 
> > 'hg diff pathname' on it.
> > 
> > This simple call took over 12 seconds on my Linux server 
> > to complete.
> > 
> > I investigated using 'strace' and it appears Mercurial
> > is using tons of lstat() and getdents() calls. In my case I 
> > counted 29009 lstat64() and 4634 getdents64() calls. lstat
> > is called for tons of files that have nothing to do with
> > my change.
> > 
> > I have the same repository in Git. There I get the response
> > in almost no time with just 12 lstat() calls and 2 getdents().
> > 
> > Can somebody have a look at this?
> 
> I recently noticed this myself. I had a ton of tmpfiles that were not under
> source control, but hg did feel the need to lstat them all anyway, which
> greatly slowed performance. 

If you have a proper .hgignore file, this usually isn't a problem.
Nonetheless, this is a bug and we are looking into it.

-- 
Mathematics is the supreme nostalgia of our time.



More information about the Mercurial mailing list