emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hideously slow VC status queries fixed


From: Alexandru Harsanyi
Subject: Re: Hideously slow VC status queries fixed
Date: Thu, 27 Dec 2007 15:13:33 +0900


On 27 Dec 2007, at 11:41 AM, Dan Nicolaescu wrote:

"Eric S. Raymond" <address@hidden> writes:

It gives me great pleasure to be able to announce that I have found,
and fixed, the bug that made C-x v d so godawful much slower than the
underlying commands.

Thank you so much for doing this!

There's still one source of inefficiency: files that are not vc- registered
at all. For example object files in a build tree.

Try this:

cd emacs/lisp/term   (because it is a small subdir)

for FF in `seq 1 1000`; do touch obj${FF}.o; done

(just create 1000 .o files)

emacs -q
M-x elp-instrument-package RET vc RET
C-x v d emacs/lisp/term RET
M-x elp-results RET

That will show  1000 calls to vc-bzr-registered, vc-git-registered,
vc-arch-registered, vc-svn-registered etc etc.

One way to reduce the number of calls is to use the `vc-BACKEND- responsible-p' functions to determine which backends are responsible for files in a directory. It will than only call the `vc-BACKEND- registered' function for the responsible backends only.

The speed of the vc-BACKEND-registered call be improved by having the `vc-BACKEND-dir-state' function set a property meaning 'not- registered' for every file that is not registered with that BACKEND. vc-BACKEND-registered will than check for that property before invoking the BACKEND command.

Best Regards,
Alex.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]