GNU bug report logs - #24126
vc-hg-state can be extremely slow

Previous Next

Package: emacs;

Reported by: Jonathan Kotta <jpkotta <at> gmail.com>

Date: Mon, 1 Aug 2016 18:42:01 UTC

Severity: normal

Full log


Message #8 received at 24126 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Jonathan Kotta <jpkotta <at> gmail.com>, 24126 <at> debbugs.gnu.org
Subject: Re: bug#24126: vc-hg-state can be extremely slow
Date: Tue, 2 Aug 2016 16:32:37 +0300
On 08/01/2016 09:40 PM, Jonathan Kotta wrote:
> Emacs uses `hg status -A` in vc-hg-state, which in turn is used in many
> vc commands (e.g. vc-root-diff).  The "-A" option makes mercurial look
> at all files under the directory, even the ignored ones.  If there are a
> lot of ignored files, this will be very slow.

Why does it do that? We're passing a specific file name to it.

> As an example, I have a repo that's 38MB / 300 files when freshly
> checked out, and 34GB / 1.2M files when the build finishes (if you're
> curious, it's a yocto project).  Without clearing the disk cache, `hg
> stat -A > /dev/null` takes 28s;

What about 'hg status -A file/name > /dev/null'?

> vg-git-state does not have this problem; currently it behaves like `hg
> status`, i.e. honoring the ignore rules.   There is actually a FIXME
> comment regarding this functionality, noting that `git ls-files -i -o
> --exclude-standard` is the equivalent to `hg status -A`; this takes over
> 400s (I got sick of waiting).

The FIXME is outdated, we'll do it by parsing 'git status --porcelain'.

Does 'git status --ignored --porcelain -- file/name' take a lot of time 
for you as well?

> I'm guessing VC has some sort of assumption that vc-x-state will return
> all files.

vc-x-state returns the state of a single file.




This bug report was last modified 149 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.