From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#30367: 26.0.91; CC-Mode: Major slowdown when isearching big C++ file. Date: Tue, 20 Mar 2018 18:49:47 +0000 Message-ID: <20180320184947.GA16673@ACM> References: <20180207152435.72040.qmail@mail.muc.de> <20180207212145.GA3963@ACM> <20180207222638.GB3963@ACM> <20180208172558.GA4335@ACM> <20180208184232.GB4335@ACM> <87372a8quy.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1521579202 22272 195.159.176.226 (20 Mar 2018 20:53:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 20 Mar 2018 20:53:22 +0000 (UTC) User-Agent: Mutt/1.7.2 (2016-11-26) Cc: 30367-done@debbugs.gnu.org To: Bastian Beischer Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Mar 20 21:53:17 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eyOFx-0005j3-9X for geb-bug-gnu-emacs@m.gmane.org; Tue, 20 Mar 2018 21:53:17 +0100 Original-Received: from localhost ([::1]:51689 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eyOI0-0001xL-Bq for geb-bug-gnu-emacs@m.gmane.org; Tue, 20 Mar 2018 16:55:24 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47115) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eyOHj-0001vJ-Qr for bug-gnu-emacs@gnu.org; Tue, 20 Mar 2018 16:55:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eyOHe-0003Df-SS for bug-gnu-emacs@gnu.org; Tue, 20 Mar 2018 16:55:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:36395) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eyOHe-0003DX-O9; Tue, 20 Mar 2018 16:55:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eyOHe-00068B-EF; Tue, 20 Mar 2018 16:55:02 -0400 Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Tue, 20 Mar 2018 20:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 30367 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: Mail-Followup-To: 30367@debbugs.gnu.org, acm@muc.de, bastian.beischer@gmail.com Original-Received: via spool by 30367-done@debbugs.gnu.org id=D30367.152157928623535 (code D ref 30367); Tue, 20 Mar 2018 20:55:02 +0000 Original-Received: (at 30367-done) by debbugs.gnu.org; 20 Mar 2018 20:54:46 +0000 Original-Received: from localhost ([127.0.0.1]:44290 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eyOHN-00067X-U9 for submit@debbugs.gnu.org; Tue, 20 Mar 2018 16:54:46 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:52946 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1eyOHK-00067N-MJ for 30367-done@debbugs.gnu.org; Tue, 20 Mar 2018 16:54:44 -0400 Original-Received: (qmail 13319 invoked by uid 3782); 20 Mar 2018 20:54:41 -0000 Original-Received: from acm.muc.de (p548C7B48.dip0.t-ipconnect.de [84.140.123.72]) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 20 Mar 2018 21:54:40 +0100 Original-Received: (qmail 16684 invoked by uid 1000); 20 Mar 2018 18:49:47 -0000 Content-Disposition: inline In-Reply-To: <87372a8quy.fsf@gmail.com> 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-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:144466 Archived-At: Hello, Bastian. On Fri, Feb 09, 2018 at 10:16:53 +0100, Bastian Beischer wrote: > Hello Alan, > Alan Mackenzie writes: [ .... ] > > Would you please try out the following patch on real code, and either > > confirm to me that it fixes the bug, or tell me what it breaks. Thanks! > > diff -r e8b2c6141f97 cc-engine.el > > --- a/cc-engine.el Fri Feb 02 20:34:15 2018 +0000 > > +++ b/cc-engine.el Thu Feb 08 18:39:40 2018 +0000 > > @@ -10547,13 +10547,6 @@ > > (looking-at c-return-key)) > > (setq braceassignp t) > > nil) > > - ((and c-has-compound-literals > > - (eq (char-after) ?,)) > > - (save-excursion > > - (when (and (c-go-up-list-backward nil lim) > > - (eq (char-after) ?\()) > > - (setq braceassignp t) > > - nil))) > > ((eq (char-after) ?=) > > ;; We've seen a =, but must check earlier tokens so > > ;; that it isn't something that should be ignored. > > [ .... ] > Yes, this patch fixes the slowdown. But since I don't understand what > the original commit which introduced the slowdown tried to fix I cannot > comment on whether or not its the right thing to do within the context > of that commit. Thanks for the prompt, positive reply. I'm afraid I can't remember either, what the original patch was for. > I will run emacs with the patch included for a while and will let you > know in case I find any problems! Nothing heard from you in the meantime. Good! > Thanks for tackling this so quickly! Sorry I've not maintained this speed in committing it. I have now committed the fix, in revision 16559146f9db1b36d5e8b6c92edb5bb36fafdb85, and I'm closing the bug. > >> > Cheers > >> > Bastian -- Alan Mackenzie (Nuremberg, Germany).