GNU bug report logs - #1024
Large C++ files load slowly, regardless of font-lock-maximum-size

Previous Next

Packages: cc-mode, emacs;

Reported by: jw_spambox <at> yahoo.com

Date: Thu, 25 Sep 2008 06:15:03 UTC

Severity: normal

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Alan Mackenzie <acm <at> muc.de>
To: jw_spambox <at> yahoo.com, 1024 <at> debbugs.gnu.org
Cc: martin rudalics <rudalics <at> gmx.at>
Subject: bug#1024: Large C++ files load slowly, regardless of font-lock-maximum-size
Date: Fri, 26 Sep 2008 07:53:19 +0000
Hi, John,

On Thu, Sep 25, 2008 at 08:22:34PM -0700, John W wrote:
> > Could you please have a look at the description of bug#851

> > http://debbugs.gnu.org/cgi/bugreport.cgi?bug=851

> > and try the recipe proposed there by Chong Yidong?

> Sure.  I tried this patch

> +++ cc-engine.el	2008/04/01 21:41:21	1.56.2.11

This slowdown happened because of an earlier bug fix.  Part of that fix
is scanning the entire buffer, "fixing" things which could derail the
syntax and font locking, e.g. preprocessor lines like this:

#warning this isn't fixed yet!
                 ^
, where the apostrophe was being treated like a string opener.

That fix was not coded with a view to speed, unfortunately.  It was later
fixed in cc-mode.el version 1.75 (CVS trunk at savannah) and version
1.58.2.12 (in the Emacs 22 branch) on 2008-05-24.

The fix was incorporated into Emacs 22.3, released a few days ago.

Also, thanks for generating and posting the stack dump, which made it
trivially easy to track down the problem.

> - John

-- 
Alan Mackenzie (Nuremberg, Germany).




This bug report was last modified 16 years and 237 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.