From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: find-file takes forever on slow network file systems and very deep directories Date: Fri, 26 Sep 2008 12:03:04 +0300 Message-ID: References: <48D86443.5090001@gmail.com> <50f5aa6a0809231114n3890d69bi77ee4c6b70572232@mail.gmail.com> <50f5aa6a0809231251k37f1f3a3p8a23b1a258a209ee@mail.gmail.com> <50f5aa6a0809250926y5047e8ei77416eb64fff5b09@mail.gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1222419824 25866 80.91.229.12 (26 Sep 2008 09:03:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 26 Sep 2008 09:03:44 +0000 (UTC) Cc: Andrzej Leszczynski To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 26 11:04:37 2008 connect(): Connection refused Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Kj9Fa-0007dr-ET for ged-emacs-devel@m.gmane.org; Fri, 26 Sep 2008 11:04:34 +0200 Original-Received: from localhost ([127.0.0.1]:60483 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kj9EX-0003cw-DH for ged-emacs-devel@m.gmane.org; Fri, 26 Sep 2008 05:03:29 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kj9EM-0003cq-MX for emacs-devel@gnu.org; Fri, 26 Sep 2008 05:03:18 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kj9EL-0003cZ-O2 for emacs-devel@gnu.org; Fri, 26 Sep 2008 05:03:18 -0400 Original-Received: from [199.232.76.173] (port=49315 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kj9EL-0003cW-77 for emacs-devel@gnu.org; Fri, 26 Sep 2008 05:03:17 -0400 Original-Received: from mtaout2.012.net.il ([84.95.2.4]:20384) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kj9EK-0002jE-W5 for emacs-devel@gnu.org; Fri, 26 Sep 2008 05:03:17 -0400 Original-Received: from HOME-C4E4A596F7 ([77.127.170.116]) by i_mtaout2.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0K7S007HUP6XJ2E1@i_mtaout2.012.net.il> for emacs-devel@gnu.org; Fri, 26 Sep 2008 12:04:18 +0300 (IDT) In-reply-to: <50f5aa6a0809250926y5047e8ei77416eb64fff5b09@mail.gmail.com> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by monty-python.gnu.org: Solaris 9.1 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:104170 Archived-At: > Date: Thu, 25 Sep 2008 09:26:59 -0700 > From: "Andrzej Leszczynski" > > > It looks like the VC package could be the culprit: there are many > > filesystem calls that look for files such as: > > > > W:\dir1\dir2\dir3\dir4\dir5\dir6\dir7\.bzr\checkout\ > > W:\dir1\dir2\dir3\dir4\dir5\dir6\dir7\dir8\dir9\dirA\dirB\dirC\RCS\ > > W:\dir1\dir2\dir3\dir4\dir5\dir6\dir7\dir8\dir9\dirA\dirB\dirC\CVS\Entries > > W:\dir1\dir2\dir3\dir4\dir5\dir6\dir7\dir8\dir9\dirA\dirB\dirC\.svn\entries > > W:\dir1\dir2\dir3\dir4\dir5\dir6\dir7\dir8\dir9\dirA\dirB\dirC\SCCS\ > > W:\dir1\dir2\dir3\dir4\dir5\dir6\dir7\dir8\dir9\dirA\dirB\dirC\file.c\_MTN\ > > W:\dir1\dir2\dir3\dir4\dir5\dir6\dir7\dir8\dir9\dirA\dirB\{arch}\ > > W:\dir1\dir2\dir3\dir4\dir5\dir6\dir7\dir8\dir9\dirA\dirB\dirC\file.c\MCVS\ > > > > This greatly enlarges the number of files and directories Emacs needs > > to `stat'. > > > > Can you try evaluating the following expression (in Emacs 22.x): > > > > (remove-hook 'find-file-hook 'vc-find-file-hook) > > > > and then see if the speed of `find-file' increases significantly as a > > result? > > > > I had the same thought - see in the USENET thread - but I did not have > the clue how to disable it. Now it loads the file much faster, > although it still _stats_ all the dirs up to the root (drive C:) Does anyone have any thoughts on how to avoid such a significant performance hit (15 sec for a simple `find-file') on Samba volumes, as opposed to just 2 seconds in Emacs 21.x, which didn't automatically have `vc-find-file-hook' on the `find-file-hook' list? If there's no good cure, we should at least provide a user option to avoid putting `vc-find-file-hook' on `find-file-hook', or maybe allow finer-grain control of it, like per filesystem. Thoughts?