From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David De La Harpe Golden Newsgroups: gmane.emacs.devel Subject: Re: Emacs 23.0 is much slower starting than Emacs 22.3 Date: Fri, 24 Oct 2008 15:32:30 +0100 Message-ID: <4901DC7E.9000202@harpegolden.net> References: <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> <4901287F.3000203@harpegolden.net> <20081024112104.GA3246@muc.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1224858781 32081 80.91.229.12 (24 Oct 2008 14:33:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 24 Oct 2008 14:33:01 +0000 (UTC) Cc: Eli Zaretskii , Lennart Borgman , monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 24 16:34:01 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 1KtNjg-0001bP-Bd for ged-emacs-devel@m.gmane.org; Fri, 24 Oct 2008 16:33:57 +0200 Original-Received: from localhost ([127.0.0.1]:33420 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KtNiW-00062X-C3 for ged-emacs-devel@m.gmane.org; Fri, 24 Oct 2008 10:32:44 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KtNiR-00061s-Bs for emacs-devel@gnu.org; Fri, 24 Oct 2008 10:32:39 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KtNiQ-00061B-CZ for emacs-devel@gnu.org; Fri, 24 Oct 2008 10:32:38 -0400 Original-Received: from [199.232.76.173] (port=32841 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KtNiQ-00060r-4S for emacs-devel@gnu.org; Fri, 24 Oct 2008 10:32:38 -0400 Original-Received: from harpegolden.net ([65.99.215.13]:36834) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KtNiM-0006Ok-8u; Fri, 24 Oct 2008 10:32:34 -0400 Original-Received: from [87.198.54.44] (87-198-54-44.ptr.magnet.ie [87.198.54.44]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "David De La Harpe Golden", Issuer "David De La Harpe Golden Personal CA rev 3" (verified OK)) by harpegolden.net (Postfix) with ESMTP id 121E88088; Fri, 24 Oct 2008 15:32:31 +0100 (IST) User-Agent: Mozilla-Thunderbird 2.0.0.17 (X11/20081018) In-Reply-To: <20081024112104.GA3246@muc.de> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) 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:104946 Archived-At: Alan Mackenzie wrote: > However, the current function isn't that slow. I timed it for 100 > iterations on a file 2,927,889 bytes big. It's taking 0.72s for this > file, i.e. about 0.25s per megabyte, and that's on my 1.2 GHz Athlon. > > So on emacs/src's 118 files.c, total size 8772802, that function would > take only 2.5s, again, on my Athlon. On your machine it would be ~0.5s. > > Besides, in my original measurements, I was executing the same CC Mode > in Emacs 22 and Emacs 23. > > c-neutralize-syntax-in-CPP isn't the problem. > Probably not, or at least not the slowdown you're seeing i.e. your relative emacs22/23 problem. N.B. It wasn't intended as a slight - I do appreciate C is a relative pain to parse, syntax-highlight and deal with in general, I'm_ not_ saying c-mode's apparently associated overhead is necessarily unreasonable, but it may explain why stuff I was generally doing in emacs day-to-day seemed to load a little bit faster than this particular test case (if you recall, I was surprised at the result) - I relatively seldom edit c files! But c-mode as a whole _does_ account for a significant chunk of the startup time on the 180 .c files I was testing with: time emacs -l fftest.el -f kill-emacs with in .emacs a sneaky (setq auto-mode-alist (cons (cons "\\.c\\'" 'text-mode) auto-mode-alist)) emacs c-mode realtime 22 on 4.951 23 on 7.388 22 off 2.830 23 off 4.089