[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Suggestion: vc-hooks.el: Make vc-handled-backends more conservative?
From: |
T. V. Raman |
Subject: |
Re: Suggestion: vc-hooks.el: Make vc-handled-backends more conservative? |
Date: |
Wed, 11 Oct 2006 06:28:53 -0700 |
Stephane --
Here is what caused me to chase down the problem.
Consider an environment where your home dir (and all users home
dirs) come from nfs and are visible as /home/user
Also assume that stat calls on nfs dirs is slow.
I found that everytime I opened a file or saved a buffer I saw
slowness. If the nfs filers were having a bad day then things in
emacs got really really bad.
I also observed by tailing /var/log/messages that the machine was
waiting on nfs responses for stat calls on /home/MCVS and
/home/{arch} --- neither of which existed --- but that still
meant you waited for the nfs system to say so.
After grepping around for {arch} and MCVS in the elisp sources I
saw that they showed up in VC -- I then toggled debug on quit
(which is what I should have done int he first place)--
saw where emacs was blocked, and the rest was easy --- since the
call in vc-find-root was the one that was initiating the stat
call on /home/MCVS and /home{arch} and since the code indicated
that the cleanest way to turn it off (clean == closest to point
of problem) was vc-ignore-dir-regexp that was the variable I
ended up setting.
Hope this helps--
>>>>> "Stefan" == Stefan Monnier <address@hidden> writes:
>> The last two --arch and MCVS have a particularly bad
>> performance penalty on systems that have NFS mounts in
>> places other than /net or /afs --- se variable
>> vc-ignore-dir-regexp
Stefan>
>> Unless one discovers the above variable
>> (vc-ignore-dir-regexp is declared as a defvar, and not as
>> defcustom) nfs based systems take a heavy performance hit
>> --- since function vc-find-root recursively ascends the
>> directory tree in attempting to check if files are under
>> version control.
Stefan>
>> Suggestions:
Stefan>
>> A) Possibly make vc-handled-backends more conservative by
>> pruning it to have RCS CVS and SVN on it by default.
Stefan>
>> B) Make vc-ignore-dir-regexp a customizable option via
>> defcustom, and add a pointer to it in the docstring for
>> vc-handled-backends so that users discover its purpose
Stefan>
Stefan> I think B is a good idea in general. Especially
Stefan> since vc-ignore-dir-regexp is useful not just for NFS
Stefan> mounts but for any other circumstance where the user
Stefan> wants to disable VC in some part of his file-system.
Stefan>
Stefan> I think A might be a good idea as well. MetaCVS is a
Stefan> rather obscure revision control system. GNU Arch is
Stefan> less so, but it's not that popular either. And there
Stefan> are several more still unsupported but whose support
Stefan> should hopefully come at some point (Mercury, bzr,
Stefan> git, DaRCS, monotone, codeville, OpenCM,
Stefan> you-name-it). So we most likely will not want *all*
Stefan> supported systems to be "active". Maybe now is not
Stefan> the worst time to start down that road.
Stefan>
>> In my case I chased it down by examining the source code
>> after observing that emacs was making excessive nfs
>> accesses during file load and save.
Stefan>
Stefan> Just to make sure that it can only be fixed with
Stefan> something like vc-ignore-dir-regexp, could you
Stefan> describe the particular circumstance where this
Stefan> happens, as well as describe as precisely as possible
Stefan> what actually happens?
Stefan>
Stefan>
Stefan> Stefan
--
Best Regards,
--raman
Email: address@hidden
WWW: http://emacspeak.sf.net/raman/
AIM: emacspeak GTalk: address@hidden
PGP: http://emacspeak.sf.net/raman/raman-almaden.asc
Google: tv+raman
IRC: irc://irc.freenode.net/#emacs