From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "T. V. Raman" Newsgroups: gmane.emacs.devel Subject: Re: Suggestion: vc-hooks.el: Make vc-handled-backends more conservative? Date: Wed, 11 Oct 2006 06:28:53 -0700 Message-ID: <17708.61845.863249.25290@gargle.gargle.HOWL> References: <17706.64279.627316.725306@gargle.gargle.HOWL> Reply-To: raman@users.sf.net NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1160573464 19013 80.91.229.2 (11 Oct 2006 13:31:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 11 Oct 2006 13:31:04 +0000 (UTC) Cc: raman@users.sf.net, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 11 15:31:02 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GXeA7-00016G-AQ for ged-emacs-devel@m.gmane.org; Wed, 11 Oct 2006 15:30:19 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GXeA6-00078O-QA for ged-emacs-devel@m.gmane.org; Wed, 11 Oct 2006 09:30:18 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GXe8n-0005cg-2y for emacs-devel@gnu.org; Wed, 11 Oct 2006 09:28:57 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GXe8m-0005b1-0L for emacs-devel@gnu.org; Wed, 11 Oct 2006 09:28:56 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GXe8l-0005am-RK for emacs-devel@gnu.org; Wed, 11 Oct 2006 09:28:55 -0400 Original-Received: from [204.127.200.82] (helo=sccrmhc12.comcast.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GXeGm-0007Dt-D6 for emacs-devel@gnu.org; Wed, 11 Oct 2006 09:37:12 -0400 Original-Received: from localhost (c-71-202-191-236.hsd1.ca.comcast.net[71.202.191.236]) by comcast.net (sccrmhc12) with ESMTP id <20061011132854012002h5a3e>; Wed, 11 Oct 2006 13:28:54 +0000 Original-Received: by localhost (Postfix, from userid 1000) id E0F6612A4002; Wed, 11 Oct 2006 06:28:53 -0700 (PDT) Original-To: monnier@iro.umontreal.ca In-Reply-To: X-Mailer: VM 7.19 under Emacs 22.0.50.3 x-attribution: tvr X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:60604 Archived-At: 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 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: raman@users.sf.net WWW: http://emacspeak.sf.net/raman/ AIM: emacspeak GTalk: tv.raman.tv@gmail.com PGP: http://emacspeak.sf.net/raman/raman-almaden.asc Google: tv+raman IRC: irc://irc.freenode.net/#emacs