[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Slow fontification in C mode buffers

From: Alan Mackenzie
Subject: Re: Slow fontification in C mode buffers
Date: Wed, 14 Dec 2011 13:14:27 +0000
User-agent: Mutt/1.5.21 (2010-09-15)

Hello, yet again!

On Tue, Dec 13, 2011 at 11:31:36PM +0800, Kan-Ru Chen wrote:
> Alan Mackenzie <address@hidden> 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).

reply via email to

[Prev in Thread] Current Thread [Next in Thread]