From unknown Fri Jun 20 07:14:14 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#1024 <1024@debbugs.gnu.org> To: bug#1024 <1024@debbugs.gnu.org> Subject: Status: Large C++ files load slowly, regardless of font-lock-maximum-size Reply-To: bug#1024 <1024@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:14:14 +0000 retitle 1024 Large C++ files load slowly, regardless of font-lock-maximum-s= ize reassign 1024 emacs,cc-mode submitter 1024 jw_spambox@yahoo.com severity 1024 normal thanks From jw_spambox@yahoo.com Wed Sep 24 23:07:25 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-4.9 required=4.0 tests=BAYES_00,FOURLA, RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 25 Sep 2008 06:07:25 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8P67Mtb009461 for ; Wed, 24 Sep 2008 23:07:23 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kik0Y-0005C7-0j for bug-gnu-emacs@gnu.org; Thu, 25 Sep 2008 02:07:22 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kik0X-0005Bv-7o for bug-gnu-emacs@gnu.org; Thu, 25 Sep 2008 02:07:21 -0400 Received: from [199.232.76.173] (port=48878 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kik0X-0005Bs-3r for bug-gnu-emacs@gnu.org; Thu, 25 Sep 2008 02:07:21 -0400 Received: from web56505.mail.re3.yahoo.com ([66.196.97.34]:37702) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1Kik0X-0006n7-3F for bug-gnu-emacs@gnu.org; Thu, 25 Sep 2008 02:07:21 -0400 Received: (qmail 36369 invoked by uid 60001); 25 Sep 2008 06:07:20 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type:Message-ID; b=KSNCr4drYuV6AxpmeEgVu4wajVdg3y3IbvVj79GAo3PyZeVk6bF7QKe8TYDQ1r+Z7PF+IFbHydvpZ4LeegPlj2S/Ljx+GWG8A5VbDbJfgZH6WOyW+IEx2EkP9Cb8hPbNfAaA57VugI3T9lXFaAxxzyrTqizu8EKhMITtfqB9RDM=; X-YMail-OSG: f8Y8phQVM1kbu9e_AP2jrshFiC9Ir7ptPaNIE2cLsxn1jFkjXNsHIT2BeUw5ltesmQ78Jye_zP0Cd.V0RCjTVfOW9EfR1x94B2f_T0iQVPzVqV062NgQ3P9JElD8OfyrjhFbXg-- Received: from [24.20.200.113] by web56505.mail.re3.yahoo.com via HTTP; Wed, 24 Sep 2008 23:07:19 PDT X-Mailer: YahooMailWebService/0.7.218.2 Date: Wed, 24 Sep 2008 23:07:19 -0700 (PDT) From: John W Reply-To: jw_spambox@yahoo.com Subject: Large C++ files load slowly, regardless of font-lock-maximum-size To: bug-gnu-emacs@gnu.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Message-ID: <133132.36158.qm@web56505.mail.re3.yahoo.com> X-detected-operating-system: by monty-python.gnu.org: FreeBSD 6.x (1) To reproduce: (1) Generate a 3M C++ file. (2) Load file. (3) Wait for emacs. <-- bug I'm using jit-lock, but I tested lazy-lock, and the behavior is the same. font-lock-maximum-size is the default. I.e. Its value is 256000 I used edebug to see what emacs was doing, and it gave me a stack like: c-literal-limits() c-neutralize-syntax-in-CPP(1 3527391 3527390) funcall(c-neutralize-syntax-in-CPP 1 3527391 3527390) (if nil c-before-font-lock-function (funcall c-before-font-lock-function (point-min) (point-max) (- ... ...))) (save-excursion (if c-get-state-before-change-function (funcall c-get-state-before-change-function ... ...)) (if nil c-before-font-lock-function (funcall c-before-font-lock-function ... ... ...))) (save-restriction (widen) (save-excursion (if c-get-state-before-change-function ...) (if nil c-before-font-lock-function ...))) c-common-init(c++-mode) c++-mode() set-auto-mode-0(c++-mode nil) set-auto-mode() normal-mode(t) after-find-file(nil t) I blame c-before-font-lock-function . If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. If you would like to further debug the crash, please read the file /usr/local/share/emacs/22.2/etc/DEBUG for instructions. In GNU Emacs 22.2.1 (i686-pc-linux-gnu) of 2008-08-27 on augustine Important settings: value of $LC_ALL: nil value of $LC_COLLATE: C value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_US.utf8 locale-coding-system: utf-8 default-enable-multibyte-characters: t Major mode: Emacs-Lisp Minor modes in effect: encoded-kbd-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t unify-8859-on-encoding-mode: t utf-translate-cjk-mode: t auto-compression-mode: t line-number-mode: t Recent input: [ 6 ~ ESC [ 6 ~ ESC [ 6 ~ ESC [ 6 ~ ESC [ 6 ~ ESC [ 6 ~ ESC [ 5 ~ ESC [ 5 ~ ESC [ 5 ~ ESC [ 5 ~ ESC [ 5 ~ ESC [ 5 ~ ESC [ 5 ~ ESC [ 5 ~ ESC [ 5 ~ ESC [ 5 ~ ESC [ 5 ~ ESC [ 5 ~ C-x k RET C-x C-e C-x k RET ESC [ A ESC [ A ESC [ A ESC [ A ESC [ A ESC [ A ESC [ A ESC [ A ESC [ A ESC [ A ESC [ A ESC [ A ESC [ A ESC [ A ESC [ A ESC [ A ESC [ A ESC [ A ESC [ B ESC [ B ESC [ B ESC [ A ESC f ESC f ESC f ESC f ESC f ESC b C-k C-_ ESC [ 5 ~ ESC [ 6 ~ ESC [ 5 ~ ESC [ 6 ~ ESC [ B ESC [ B ESC [ B ESC [ B ESC [ B ESC [ B ESC [ B ESC [ B ESC [ B ESC [ B ESC [ A C-@ ESC [ B ESC [ B ESC [ B C-x b C-g C-x o C-g ESC [ A ESC [ A ESC [ A ESC f ESC f ESC b ESC f ESC f ESC f ESC f ESC b C-k C-_ C-x b RET C-x b RET ESC x e m a c s - b DEL d e TAB DEL DEL TAB DEL DEL DEL DEL DEL DEL b u TAB DEL DEL g n TAB DEL DEL DEL DEL r e p o TAB r t TAB RE T Recent messages: # Auto-saving...done Undo! Mark set Entering debugger... Quit Undo! Auto-saving...done Making completion list... [3 times] Loading emacsbug...done From rgm@gnu.org Thu Sep 25 00:58:40 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-9.5 required=4.0 tests=AWL,BAYES_00,MISSING_SUBJECT, NOSUBJECT,RCVD_IN_DNSWL_MED,VALID_BTS_CONTROL,X_DEBBUGS_NO_ACK autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at control) by emacsbugs.donarmstrong.com; 25 Sep 2008 07:58:40 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8P7wbiY003923 for ; Thu, 25 Sep 2008 00:58:39 -0700 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1KiliB-0004nX-67; Thu, 25 Sep 2008 03:56:31 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18651.17454.936561.550439@fencepost.gnu.org> Date: Thu, 25 Sep 2008 03:56:30 -0400 From: Glenn Morris To: control X-Attribution: GM X-Mailer: VM (www.wonderworks.com/vm), GNU Emacs (www.gnu.org/software/emacs) X-Hue: blue X-Ran: (OW4K0o1wu"VQ$rc2j7/8~Xy)H; Thu, 25 Sep 2008 05:17:22 -0700 Received: (qmail invoked by alias); 25 Sep 2008 12:17:14 -0000 Received: from 62-47-40-37.adsl.highway.telekom.at (EHLO [62.47.40.37]) [62.47.40.37] by mail.gmx.net (mp065) with SMTP; 25 Sep 2008 14:17:14 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX19K+mkBMelKflpC1mP1ZfcdZgu1JafQDfFTyRMBud 0/smMnpmxihHWo Message-ID: <48DB8026.4040201@gmx.at> Date: Thu, 25 Sep 2008 14:12:22 +0200 From: martin rudalics User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: jw_spambox@yahoo.com, 1024@debbugs.gnu.org Subject: Re: bug#1024: Large C++ files load slowly, regardless of font-lock-maximum-size References: <133132.36158.qm@web56505.mail.re3.yahoo.com> In-Reply-To: <133132.36158.qm@web56505.mail.re3.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.6899999999999999 > I used edebug to see what emacs was doing, and it gave me a stack like: > > c-literal-limits() > c-neutralize-syntax-in-CPP(1 3527391 3527390) > funcall(c-neutralize-syntax-in-CPP 1 3527391 3527390) > (if nil c-before-font-lock-function (funcall c-before-font-lock-function (point-min) (point-max) (- ... ...))) > (save-excursion (if c-get-state-before-change-function (funcall c-get-state-before-change-function ... ...)) (if nil c-before-font-lock-function (funcall c-before-font-lock-function ... ... ...))) > (save-restriction (widen) (save-excursion (if c-get-state-before-change-function ...) (if nil c-before-font-lock-function ...))) > c-common-init(c++-mode) > c++-mode() > set-auto-mode-0(c++-mode nil) > set-auto-mode() > normal-mode(t) > after-find-file(nil t) > > I blame c-before-font-lock-function . 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? martin From usenet@muc.de Thu Sep 25 05:53:21 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-4.8 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER, INVALID_DATE,MSGID_RANDY,RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 25 Sep 2008 12:53:22 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8PCrEbH013657 for ; Thu, 25 Sep 2008 05:53:16 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KiqLK-0008Cu-JW for bug-gnu-emacs@gnu.org; Thu, 25 Sep 2008 08:53:14 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KiqLI-0008CW-2q for bug-gnu-emacs@gnu.org; Thu, 25 Sep 2008 08:53:13 -0400 Received: from [199.232.76.173] (port=36045 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KiqLH-0008CT-Td for bug-gnu-emacs@gnu.org; Thu, 25 Sep 2008 08:53:11 -0400 Received: from moderators.individual.net ([130.133.4.7]:53468) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KiqLH-0002fW-Dj for bug-gnu-emacs@gnu.org; Thu, 25 Sep 2008 08:53:11 -0400 Received: from colin.muc.de ([193.149.48.1] helo=mail.muc.de) by moderators.individual.net (Exim 4.69) for gnu-emacs-bug@moderators.isc.org with esmtp (envelope-from ) id <1KiqLA-0007Mu-Cj>; Thu, 25 Sep 2008 14:53:04 +0200 Received: (qmail 77721 invoked by uid 8); 25 Sep 2008 12:53:03 -0000 Date: 25 Sep 2008 14:53:03 +0200 To: gnu-emacs-bug@moderators.isc.org Path: not-for-mail From: Alan Mackenzie Newsgroups: gnu.emacs.bug Subject: Re: bug#1024: Large C++ files load slowly, regardless of font-lock-maximum-size Date: Thu, 25 Sep 2008 12:53:03 +0000 (UTC) Organization: muc.de e.V. -- private internet access Lines: 48 Message-ID: References: NNTP-Posting-Host: marvin.muc.de X-Trace: colin2.muc.de 1222347183 77717 2001:608:1000::2 (25 Sep 2008 12:53:03 GMT) X-Complaints-To: news-admin@muc.de NNTP-Posting-Date: Thu, 25 Sep 2008 12:53:03 +0000 (UTC) User-Agent: tin/1.6.2-20030910 ("Pabbay") (UNIX) (FreeBSD/4.11-RELEASE (i386)) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Hi, John. John W wrote: > To reproduce: > (1) Generate a 3M C++ file. > (2) Load file. > (3) Wait for emacs. <-- bug > I'm using jit-lock, but I tested lazy-lock, and the behavior is the same. > font-lock-maximum-size is the default. I.e. > Its value is 256000 > I used edebug to see what emacs was doing, and it gave me a stack like: > c-literal-limits() > c-neutralize-syntax-in-CPP(1 3527391 3527390) > funcall(c-neutralize-syntax-in-CPP 1 3527391 3527390) > (if nil c-before-font-lock-function (funcall c-before-font-lock-function (point-min) (point-max) (- ... ...))) > (save-excursion (if c-get-state-before-change-function (funcall c-get-state-before-change-function ... ...)) (if nil c-before-font-lock-function (funcall c-before-font-lock-function ... ... ...))) > (save-restriction (widen) (save-excursion (if c-get-state-before-change-function ...) (if nil c-before-font-lock-function ...))) > c-common-init(c++-mode) > c++-mode() > set-auto-mode-0(c++-mode nil) > set-auto-mode() > normal-mode(t) > after-find-file(nil t) Thanks for taking the trouble to generate this stack dump; it identifies the problem completely. This bug was caused by a previous bug fix which introduced a complete scan over the entire buffer when it's loaded. One function, `c-neutralize-syntax-in-CPP' had been coded very inefficiently. It was recoded for speed on 2008-05-24, committed in .../emacs/lisp/progmodes/cc-mode.el version 1.58.2.12 (Emacs 22 branch) and version 1.75 (trunk) at savannah. To get the fixed version, either: (i) Upgrade to Emacs 22.3; or (ii) If you're using the Emacs 23 CVS, update your version. [ .... ] -- Alan Mackenzie (Nuremberg, Germany). From rgm@gnu.org Thu Sep 25 09:06:02 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-8.5 required=4.0 tests=AWL,BAYES_00,MISSING_SUBJECT, NOSUBJECT,RCVD_IN_DNSWL_MED,X_DEBBUGS_NO_ACK autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at control) by emacsbugs.donarmstrong.com; 25 Sep 2008 16:06:02 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8PG5tP2030589 for ; Thu, 25 Sep 2008 09:05:56 -0700 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1KitJk-0008Lq-Nn; Thu, 25 Sep 2008 12:03:48 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18651.46692.658276.841478@fencepost.gnu.org> Date: Thu, 25 Sep 2008 12:03:48 -0400 From: Glenn Morris To: control X-Attribution: GM X-Mailer: VM (www.wonderworks.com/vm), GNU Emacs (www.gnu.org/software/emacs) X-Hue: magenta X-Ran: 6jOstV]}D%c@ljDAx4IlC9GD.j`bJ?zHk=dTN)$`t#V%2n#"s$I`Dm6Xyb?Q*^Wy}%U@NA X-Debbugs-No-Ack: yes close 1024 From jw_spambox@yahoo.com Thu Sep 25 20:22:43 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-5.9 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1024) by emacsbugs.donarmstrong.com; 26 Sep 2008 03:22:43 +0000 Received: from web56508.mail.re3.yahoo.com (web56508.mail.re3.yahoo.com [66.196.97.37]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id m8Q3MeYA003357 for <1024@emacsbugs.donarmstrong.com>; Thu, 25 Sep 2008 20:22:41 -0700 Received: (qmail 91325 invoked by uid 60001); 26 Sep 2008 03:22:34 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Message-ID; b=mfp6A/gI9NFYHOKbmGR6OvmJyNyH9OJ22o0dFARUJFhjLfNE8IH7/M2XnMt8n6jyTM7hM0czDQ0CaYyV8RGO0HqQ6705LbGJ4Yya0/DI4g+SUq8tfSPY477BKmrU78IrVPWCbxAOrEqyPzp0UWpKMB+B1KJ+TpBhbfsOE90JlCE=; X-YMail-OSG: 8D3lOjcVM1n7dHUhEJl5LdTJ5EG.wnUpcWw8hJtxsL5vPtMjMkW2_S16p1IpObaedw-- Received: from [24.20.200.113] by web56508.mail.re3.yahoo.com via HTTP; Thu, 25 Sep 2008 20:22:34 PDT X-Mailer: YahooMailWebService/0.7.218.2 Date: Thu, 25 Sep 2008 20:22:34 -0700 (PDT) From: John W Reply-To: jw_spambox@yahoo.com Subject: Re: bug#1024: Large C++ files load slowly, regardless of font-lock-maximum-size To: martin rudalics Cc: 1024@debbugs.gnu.org In-Reply-To: <48DB8026.4040201@gmx.at> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Message-ID: <706144.90919.qm@web56508.mail.re3.yahoo.com> > 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 but it made no difference; it is still slow, and when I examine the stack, it is the same stack trace. The file loads in 2 seconds in fundamental mode, but takes about 2 minutes in C++ mode. I should have mentioned that this is a preprocessed C++ file, with many compiler directies, such as #line 1 "somefile.h", and I now think the problem is provoked by the compiler directives. If I globally replace the #line stuff like so: #line 1 "some_file.h" --> s = "some_file.h" the file loads in about 7 seconds. - John From rgm@gnu.org Thu Sep 25 21:06:01 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-8.4 required=4.0 tests=AWL,BAYES_00,MISSING_SUBJECT, NOSUBJECT,RCVD_IN_DNSWL_MED,TVD_SPACE_RATIO,VALID_BTS_CONTROL, X_DEBBUGS_NO_ACK autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at control) by emacsbugs.donarmstrong.com; 26 Sep 2008 04:06:01 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8Q45wxY014689 for ; Thu, 25 Sep 2008 21:06:00 -0700 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1Kj4YZ-0003Ht-F8; Fri, 26 Sep 2008 00:03:51 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18652.24359.398150.9599@fencepost.gnu.org> Date: Fri, 26 Sep 2008 00:03:51 -0400 From: Glenn Morris To: control X-Attribution: GM X-Mailer: VM (www.wonderworks.com/vm), GNU Emacs (www.gnu.org/software/emacs) X-Hue: magenta X-Ran: xC`IOJ;&P#bmB; Fri, 26 Sep 2008 00:46:40 -0700 Received: (qmail 33600 invoked by uid 3782); 26 Sep 2008 07:46:36 -0000 Received: from acm.muc.de (pD9E5006E.dip.t-dialin.net [217.229.0.110]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Fri, 26 Sep 2008 09:46:35 +0200 Received: (qmail 1917 invoked by uid 1000); 26 Sep 2008 07:53:19 -0000 Date: Fri, 26 Sep 2008 07:53:19 +0000 To: jw_spambox@yahoo.com, 1024@debbugs.gnu.org Cc: martin rudalics Subject: Re: bug#1024: Large C++ files load slowly, regardless of font-lock-maximum-size Message-ID: <20080926075319.GA1659@muc.de> References: <48DB8026.4040201@gmx.at> <706144.90919.qm@web56508.mail.re3.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <706144.90919.qm@web56508.mail.re3.yahoo.com> User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) From: Alan Mackenzie X-Primary-Address: acm@muc.de 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). From rgm@gnu.org Tue Sep 30 18:57:23 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-7.0 required=4.0 tests=AWL,BAYES_00,MISSING_SUBJECT, NOSUBJECT,RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at control) by emacsbugs.donarmstrong.com; 1 Oct 2008 01:57:23 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m911vKBH003847 for ; Tue, 30 Sep 2008 18:57:21 -0700 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1Kkqvi-0003lf-NU; Tue, 30 Sep 2008 21:55:06 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18658.55418.660832.54151@fencepost.gnu.org> Date: Tue, 30 Sep 2008 21:55:06 -0400 From: Glenn Morris To: control close 1018 close 1024 close 1054 reassign 1060 emacs,gnus From unknown Fri Jun 20 07:14:14 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: $requester Subject: Internal Control Message-Id: bug archived. Date: Wed, 29 Oct 2008 14:24:03 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A log time ago, in a galaxy far, far away # something happened. # # Magically this resulted in the following # action being taken, but this fake control # message doesn't tell you why it happened # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator