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: Thu, 8 Feb 2018 17:25:58 +0000 Message-ID: <20180208172558.GA4335__26357.2043077604$1518112391$gmane$org@ACM> References: <20180207152435.72040.qmail@mail.muc.de> <20180207212145.GA3963@ACM> <20180207222638.GB3963@ACM> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1518112391 23844 195.159.176.226 (8 Feb 2018 17:53:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 8 Feb 2018 17:53:11 +0000 (UTC) User-Agent: Mutt/1.7.2 (2016-11-26) Cc: 30367@debbugs.gnu.org To: Bastian Beischer Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Feb 08 18:53:06 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 1ejqMz-0003i7-UB for geb-bug-gnu-emacs@m.gmane.org; Thu, 08 Feb 2018 18:52:26 +0100 Original-Received: from localhost ([::1]:57566 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ejqP1-0006IV-9a for geb-bug-gnu-emacs@m.gmane.org; Thu, 08 Feb 2018 12:54:31 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56245) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ejq8B-0007wG-2G for bug-gnu-emacs@gnu.org; Thu, 08 Feb 2018 12:37:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ejq8A-00061v-6k for bug-gnu-emacs@gnu.org; Thu, 08 Feb 2018 12:37:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54613) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ejq86-0005zT-Bk; Thu, 08 Feb 2018 12:37:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ejq85-0001Th-Vx; Thu, 08 Feb 2018 12:37:02 -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: Thu, 08 Feb 2018 17:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30367 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: Original-Received: via spool by 30367-submit@debbugs.gnu.org id=B30367.15181113895641 (code B ref 30367); Thu, 08 Feb 2018 17:37:01 +0000 Original-Received: (at 30367) by debbugs.gnu.org; 8 Feb 2018 17:36:29 +0000 Original-Received: from localhost ([127.0.0.1]:34277 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ejq7Z-0001Sv-I5 for submit@debbugs.gnu.org; Thu, 08 Feb 2018 12:36:29 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:59394 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1ejq7X-0001Sm-G0 for 30367@debbugs.gnu.org; Thu, 08 Feb 2018 12:36:28 -0500 Original-Received: (qmail 6524 invoked by uid 3782); 8 Feb 2018 17:36:25 -0000 Original-Received: from acm.muc.de (p548C6A59.dip0.t-ipconnect.de [84.140.106.89]) by colin.muc.de (tmda-ofmipd) with ESMTP; Thu, 08 Feb 2018 18:36:24 +0100 Original-Received: (qmail 4374 invoked by uid 1000); 8 Feb 2018 17:25:58 -0000 Content-Disposition: inline In-Reply-To: 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:143028 Archived-At: Hello, Bastian. On Wed, Feb 07, 2018 at 23:45:03 +0100, Bastian Beischer wrote: > On Wed, Feb 7, 2018 at 11:26 PM, Alan Mackenzie wrote: > > Hello, Bastian. [ .... ] > >> then search for 'isinsha'. > > Yes, searching for "isinsha", I see the slowdown. Thanks! I also see > > c-looking-at-or-maybe-in-bracelist as taking an excessive amount of > > processing. > > So I can reproduce it! > Great, so our results are consistent. I think I understand what's happening, now. c-looking-at-or-maybe-in-bracelist attempts to go back over the innards of a brace list to the enclosing "{". At L+122, in new handling for a comma, I rather rashly inserted a `c-go-up-list-backward' to test whether the comma is inside a brace. This was in a loop, once for each sexp. In your sample file there is, at L10,653 a construct at top level with _lots_ of commas. My loop is trying to go to the non-existent containing brace for each of these commas, so ends up scanning to BOB for each of them. This entire activity will be being done several times. I timed a single `c-go-up-list-backward' from one of these commas at 0.033 seconds. 30 of these take about a second, and my machine is anything but slow. So, I just need to work out a way of fixing this, which may take some while (sorry). Thanks again for reporting the bug. [ .... ] > Cheers > Bastian -- Alan Mackenzie (Nuremberg, Germany).