From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#18134: 24.3; Doxygen comments trigger anomalous C++ major mode behavior Date: Mon, 7 Oct 2019 00:42:46 +0200 Message-ID: References: <87ppgpiraa.fsf@octopus.email-scan.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="160428"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 18134@debbugs.gnu.org To: Sam Varshavchik Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 07 00:44:13 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iHFG9-000fct-3p for geb-bug-gnu-emacs@m.gmane.org; Mon, 07 Oct 2019 00:44:13 +0200 Original-Received: from localhost ([::1]:37300 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iHFG7-0006ih-Fc for geb-bug-gnu-emacs@m.gmane.org; Sun, 06 Oct 2019 18:44:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47138) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iHFG0-0006gi-V0 for bug-gnu-emacs@gnu.org; Sun, 06 Oct 2019 18:44:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iHFFz-0007bb-Qb for bug-gnu-emacs@gnu.org; Sun, 06 Oct 2019 18:44:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38159) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iHFFx-0007an-TX; Sun, 06 Oct 2019 18:44:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iHFFx-0008Qt-Px; Sun, 06 Oct 2019 18:44:01 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <87ppgpiraa.fsf@octopus.email-scan.com> Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Sun, 06 Oct 2019 22:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18134 X-GNU-PR-Package: emacs,cc-mode Original-Received: via spool by 18134-submit@debbugs.gnu.org id=B18134.157040178432304 (code B ref 18134); Sun, 06 Oct 2019 22:44:01 +0000 Original-Received: (at 18134) by debbugs.gnu.org; 6 Oct 2019 22:43:04 +0000 Original-Received: from localhost ([127.0.0.1]:46978 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iHFF2-0008Ow-FB for submit@debbugs.gnu.org; Sun, 06 Oct 2019 18:43:04 -0400 Original-Received: from mail-pf1-f177.google.com ([209.85.210.177]:41162) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iHFF1-0008OK-31 for 18134@debbugs.gnu.org; Sun, 06 Oct 2019 18:43:03 -0400 Original-Received: by mail-pf1-f177.google.com with SMTP id q7so7394593pfh.8 for <18134@debbugs.gnu.org>; Sun, 06 Oct 2019 15:43:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=pkcx1mTj3XGHWOCpxj8PrEXGTZjVbTuyvBUEhMScyl4=; b=mgyK/5qb27au+lL8uL9Lwjo4Vi8Y3/vjceUZurwA8IWPdPtEYbeWCcNhrXWK0y5Aa+ gUrYaPCh0ae4Vxp1wbjlaYsi7hm7YeW9V/LEFqtRcqugbZmzhZnc+JLiwrJGiVP3OnGn 86HF0k0e4z3wlStHbxOgNzBK4A65wnLgvweBLf9253ZmYj/Ww9TaM/e3IwLp7Gjl8+0P kR0l9RCfeC5nDmBJAMHliYyeRlGK+oZULbvHQb0ZWIsddWnWOG7FA55Yb8+B7D8okgrW /ZuhUxgTP9JIA5wvrWJ+jkGW4jIJoSDHVGCE73RrLH8kv13GnswzHXtcziBESee/Jc8F ZiEA== X-Gm-Message-State: APjAAAUBOy7u2WxtyKGNkBOacU5zDB3LK7k3xYhPKXpNRiNCNxHXLasN Nf3Rm9mO9RArRKtyiEyq6Xn0JLD3KcRJUnRBYG8= X-Google-Smtp-Source: APXvYqxAQsGPtlYzsbgwFS+zPBEbBaUJioNaGznacpsSaIafuxEQnsPsAAXikRVth76qb+ancrhlAieeoIb//15OZIY= X-Received: by 2002:aa7:8750:: with SMTP id g16mr28991219pfo.190.1570401777198; Sun, 06 Oct 2019 15:42:57 -0700 (PDT) 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: 209.51.188.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:168468 Archived-At: found 27.0.50 thanks Sam Varshavchik writes: > I am seeing anomalous behavior in C++ major mode that's triggered by > long, but not excessively long -- only a few hundred lines -- Doxygen-style > comments. > > Cursor navigation at the end of the Doxygen comment block in the > following file (just before the first typedef), and trying to add some > additional text there, results in 3-5 seconds' worth of delays for > nearly typed character. > > Highlighting the entire Doxygen comment block: M-x indent-region takes > several minutes (!) with emacs consuming 100% CPU. [Snipped a long C++ example file here.] I can reproduce both issues on current master using the provided example file. 1. Editing is very slow after the Doxygen comment block. 2. Opening the example file under "emacs -Q", pressing C-x h TAB takes several minutes and sees the emacs process consume 100 % CPU (on one core at least). Using the profiler during step 2 gives me: >- command-execute 59856 97% > - call-interactively 59856 97% > - funcall-interactively 59827 97% > - c-indent-line-or-region 59820 97% > - c-indent-region 59819 97% > - c-guess-basic-syntax 59809 97% > - c-beginning-of-statement-1 39327 63% > - c-crosses-statement-barrier-p 39105 63% > - c-backward-sws 22222 36% > + c-beginning-of-macro 492 0% > # 1 0% > c-literal-limits 9508 15% > c-literal-start 6228 10% > + c-at-macro-vsemi-p 217 0% > + c-backward-sws 61 0% > + c-at-macro-vsemi-p 16 0% > + c-beginning-of-macro 10 0% > - c-just-after-func-arglist-p 19872 32% > - c-beginning-of-statement-1 19872 32% > - c-crosses-statement-barrier-p 19795 32% > - c-backward-sws 11424 18% > + c-beginning-of-macro 287 0% > # 2 0% > c-literal-limits 4707 7% > c-literal-start 3095 5% > + c-at-macro-vsemi-p 121 0% > + c-backward-sws 17 0% > c-beginning-of-macro 2 0% > c-at-macro-vsemi-p 1 0% > + c-looking-at-inexpr-block 1 0% > + c-backward-sws 202 0% > + c-back-over-member-initializers 106 0% > + c-determine-limit 103 0% > + c-parse-state 61 0% > + c-looking-at-decl-block 55 0% > + c-looking-at-inexpr-block 19 0% > + c-syntactic-skip-backward 13 0% > + c-back-over-member-initializer-braces 4 0% > + c-beginning-of-decl-1 4 0% > + c-in-literal 3 0% > + c-at-macro-vsemi-p 1 0% > + c-inside-bracelist-p 1 0% > + c-at-statement-start-p 1 0% > + c-indent-line 9 0% > + execute-extended-command 7 0% > - byte-code 29 0% > + read-extended-command 29 0% >+ ... 1784 2% (Quoted above so Gmail doesn't mess it up...) Best regards, Stefan Kangas