From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#25706: 26.0.50; Slow C file fontification Date: Tue, 1 Dec 2020 09:29:52 +0000 Message-ID: References: <55C404DC-1C29-449F-9A49-B20EDFFCFCEA@acm.org> <86EC566E-0CE6-4D98-9025-0C0551CE1546@acm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15796"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Lars Ingebrigtsen , 25706@debbugs.gnu.org To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 01 10:31:09 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kk205-00043N-IE for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 01 Dec 2020 10:31:09 +0100 Original-Received: from localhost ([::1]:34090 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kk204-0006Sp-Fx for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 01 Dec 2020 04:31:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51304) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kk1zx-0006Sg-Uf for bug-gnu-emacs@gnu.org; Tue, 01 Dec 2020 04:31:01 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46283) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kk1zx-0006QM-MF; Tue, 01 Dec 2020 04:31:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kk1zx-0006aN-Je; Tue, 01 Dec 2020 04:31:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Tue, 01 Dec 2020 09:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25706 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 25706-submit@debbugs.gnu.org id=B25706.160681500125108 (code B ref 25706); Tue, 01 Dec 2020 09:31:01 +0000 Original-Received: (at 25706) by debbugs.gnu.org; 1 Dec 2020 09:30:01 +0000 Original-Received: from localhost ([127.0.0.1]:57807 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kk1yz-0006Wm-AR for submit@debbugs.gnu.org; Tue, 01 Dec 2020 04:30:01 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:45454 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1kk1yx-0006WC-St for 25706@debbugs.gnu.org; Tue, 01 Dec 2020 04:30:00 -0500 Original-Received: (qmail 51556 invoked by uid 3782); 1 Dec 2020 09:29:52 -0000 Original-Received: from acm.muc.de (p4fe15c10.dip0.t-ipconnect.de [79.225.92.16]) by localhost.muc.de (tmda-ofmipd) with ESMTP; Tue, 01 Dec 2020 10:29:52 +0100 Original-Received: (qmail 5239 invoked by uid 1000); 1 Dec 2020 09:29:52 -0000 Content-Disposition: inline In-Reply-To: <86EC566E-0CE6-4D98-9025-0C0551CE1546@acm.org> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:194718 Archived-At: Hello again, Mattias. On Mon, Nov 30, 2020 at 18:04:56 +0100, Mattias Engdegård wrote: > > Actually, it's the underscores! > Found it. Suggested fix attached. > It can be improved: at least one pair of regexp group brackets can be > removed, but I didn't dare doing so because I wasn't sure if it would > throw some group numbers off by one. > Alan, please, let's work together and remove unnecessary capture groups > from the regexps! Even XEmacs regexps support non-capturing brackets, > \(?:...\), and they save time, regexp stack space, and reduce the > hassle of computing the 'regexp depth' everywhere. There are 342 occurrences of '\\\\([^?]' in CC Mode. Most of these can surely be replaced by "\\(?:", but not all, by a long way. This change will be fun. -- Alan Mackenzie (Nuremberg, Germany).