From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Emacs 23.0 is much slower starting than Emacs 22.3 Date: Fri, 24 Oct 2008 14:42:52 -0400 Message-ID: References: <20081022091136.GB924@muc.de> <20081022151444.GE924@muc.de> <48FF58FB.6000302@harpegolden.net> <20081022211202.GA1037@muc.de> <49001F5A.7040402@harpegolden.net> <20081023090908.GB2666@muc.de> <4900ACF9.7060501@harpegolden.net> <4900FF17.2000203@harpegolden.net> <49011336.10307@harpegolden.net> <4901E787.40504@harpegolden.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1224873798 21864 80.91.229.12 (24 Oct 2008 18:43:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 24 Oct 2008 18:43:18 +0000 (UTC) Cc: acm@muc.de, Eli Zaretskii , Lennart Borgman , emacs-devel@gnu.org To: David De La Harpe Golden Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 24 20:44:19 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 1KtRdw-00006N-B1 for ged-emacs-devel@m.gmane.org; Fri, 24 Oct 2008 20:44:16 +0200 Original-Received: from localhost ([127.0.0.1]:57041 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KtRcq-0008Mz-Nh for ged-emacs-devel@m.gmane.org; Fri, 24 Oct 2008 14:43:08 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KtRcl-0008KZ-0T for emacs-devel@gnu.org; Fri, 24 Oct 2008 14:43:03 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KtRci-0008JM-DG for emacs-devel@gnu.org; Fri, 24 Oct 2008 14:43:01 -0400 Original-Received: from [199.232.76.173] (port=34235 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KtRci-0008JJ-6C for emacs-devel@gnu.org; Fri, 24 Oct 2008 14:43:00 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:40614) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KtRcf-0000uj-7N; Fri, 24 Oct 2008 14:42:57 -0400 Original-Received: from alfajor.home (vpn-132-204-232-49.acd.umontreal.ca [132.204.232.49]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id m9OIhPKB008902; Fri, 24 Oct 2008 14:43:25 -0400 Original-Received: by alfajor.home (Postfix, from userid 20848) id 767651C178; Fri, 24 Oct 2008 14:42:52 -0400 (EDT) In-Reply-To: <4901E787.40504@harpegolden.net> (David De La Harpe Golden's message of "Fri, 24 Oct 2008 16:19:35 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3132=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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:104958 Archived-At: >>> Most of the latter is in "hack-project-variables", and most of /that/ is >>> "project-find-settings-file", and most of that is the >>> "locate-dominating-file" walk. >> locate-dominating-file (or rather some equivalent code) is also used in >> VC to detect the revision control system used for the file. >> It's actually used 5 times there (once each for Bzr Git Hg Mtn Arch), so >> are you sure only the one in project-find-settings-file costs us >> the slowdown? > Not all of it, but it seems to be significant. > taking out locate-dominating-file with: > (defun locate-dominating-file (file regexp) nil) > runs just now (one after the other, no reboot, so probably > from OS cache anyway) > emacs l-d-f realtime > 22 n/a 4.921 > 23 off 6.188 > 23 on 7.500 > Taking out hack-project-variables as a whole similarly > emacs h-p-v realtime > 23 off 6.079 > So it's about 1/2 the slowdown? > Then I set vc-handled-backends to nil (not sure that stops > vc searching totally, mind): > emacs vc-h-b h-p-v realtime > 23 off off 5.503 > 23 off on 7.189 Setting vc-handled-backends to nil should indeed stop VC from doing those directory walks. So now I don't understand why the walks done by VC are so much cheaper than the ones done by locate-dominating-file. Could it be that all the files you opened were under CVS control (so the VC search stops before having to walk up the directories)? Stefan