From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Slow fontification in C mode buffers Date: Wed, 14 Dec 2011 13:14:27 +0000 Message-ID: <20111214131427.GE4025@acm.acm> References: <83vcpxbxn0.fsf@gnu.org> <20111203151824.GA4566@acm.acm> <87pqfso5d3.fsf@isil.kanru.info> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1323868853 26404 80.91.229.12 (14 Dec 2011 13:20:53 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 14 Dec 2011 13:20:53 +0000 (UTC) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Kan-Ru Chen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 14 14:20:46 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RaolJ-00031d-UU for ged-emacs-devel@m.gmane.org; Wed, 14 Dec 2011 14:20:46 +0100 Original-Received: from localhost ([::1]:59375 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RaolI-0007m6-TS for ged-emacs-devel@m.gmane.org; Wed, 14 Dec 2011 08:20:44 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:59346) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RaolC-0007lz-1o for emacs-devel@gnu.org; Wed, 14 Dec 2011 08:20:43 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Raol2-0003dp-NK for emacs-devel@gnu.org; Wed, 14 Dec 2011 08:20:38 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:52918 helo=mail.muc.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Raol2-0003dX-8c for emacs-devel@gnu.org; Wed, 14 Dec 2011 08:20:28 -0500 Original-Received: (qmail 83325 invoked by uid 3782); 14 Dec 2011 13:20:26 -0000 Original-Received: from acm.muc.de (pD9557276.dip.t-dialin.net [217.85.114.118]) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 14 Dec 2011 14:20:24 +0100 Original-Received: (qmail 4704 invoked by uid 1000); 14 Dec 2011 13:14:27 -0000 Content-Disposition: inline In-Reply-To: <87pqfso5d3.fsf@isil.kanru.info> User-Agent: Mutt/1.5.21 (2010-09-15) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 193.149.48.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:146708 Archived-At: Hello, yet again! On Tue, Dec 13, 2011 at 11:31:36PM +0800, Kan-Ru Chen wrote: > Alan Mackenzie writes: > > By a happy coincidence, I've just tracked down another sluggishness (in > > large array initialisations, reported by Peter Milliken on bug-cc-mode) > > which looks to have exactly the same cause, namely > > `c-font-lock-enclosing-decls' which fontifies the innards of a > > struct/union/enum when jit-lock etc. starts in the middle of it. > Is this the same problem? > http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10288 As a workaround, put this into your .emacs: (add-hook 'c-mode-common-hook (lambda () (setq c-macro-with-semi-re nil))) . It gives a speed up of about a factor of 4. As a more drastic workaround, disable font-locking with M-x font-lock-mode . > -- > Kanru -- Alan Mackenzie (Nuremberg, Germany).