From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: ngeiswei@googlemail.com Newsgroups: gmane.emacs.bugs Subject: bug#30735: 25.3; slow comment c++-mode Date: Tue, 06 Mar 2018 21:25:56 +0200 Message-ID: <1520364356.10274.1.camel@googlemail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1520364322 30104 195.159.176.226 (6 Mar 2018 19:25:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 6 Mar 2018 19:25:22 +0000 (UTC) To: 30735@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Mar 06 20:25:18 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 1etICx-000615-50 for geb-bug-gnu-emacs@m.gmane.org; Tue, 06 Mar 2018 20:25:07 +0100 Original-Received: from localhost ([::1]:57743 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1etIEz-0007Ij-B2 for geb-bug-gnu-emacs@m.gmane.org; Tue, 06 Mar 2018 14:27:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55861) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1etIEr-0007IJ-T8 for bug-gnu-emacs@gnu.org; Tue, 06 Mar 2018 14:27:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1etIEo-0001lB-IN for bug-gnu-emacs@gnu.org; Tue, 06 Mar 2018 14:27:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:40129) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1etIEo-0001kp-Di for bug-gnu-emacs@gnu.org; Tue, 06 Mar 2018 14:27:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1etIEo-0002V0-4U for bug-gnu-emacs@gnu.org; Tue, 06 Mar 2018 14:27:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: ngeiswei@googlemail.com Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 06 Mar 2018 19:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 30735 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15203643759548 (code B ref -1); Tue, 06 Mar 2018 19:27:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 6 Mar 2018 19:26:15 +0000 Original-Received: from localhost ([127.0.0.1]:48026 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1etIE3-0002Tw-2z for submit@debbugs.gnu.org; Tue, 06 Mar 2018 14:26:15 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:36527) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1etIE1-0002Ti-00 for submit@debbugs.gnu.org; Tue, 06 Mar 2018 14:26:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1etIDu-0001OE-FI for submit@debbugs.gnu.org; Tue, 06 Mar 2018 14:26:07 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:36576) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1etIDu-0001O3-C2 for submit@debbugs.gnu.org; Tue, 06 Mar 2018 14:26:06 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55709) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1etIDs-00076m-NP for bug-gnu-emacs@gnu.org; Tue, 06 Mar 2018 14:26:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1etIDp-0001LB-Fa for bug-gnu-emacs@gnu.org; Tue, 06 Mar 2018 14:26:04 -0500 Original-Received: from mail-wr0-x234.google.com ([2a00:1450:400c:c0c::234]:35622) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1etIDp-0001J8-5A for bug-gnu-emacs@gnu.org; Tue, 06 Mar 2018 14:26:01 -0500 Original-Received: by mail-wr0-x234.google.com with SMTP id l43so22134267wrc.2 for ; Tue, 06 Mar 2018 11:26:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=message-id:subject:from:to:date:mime-version :content-transfer-encoding; bh=O2LwhUtYyFeJuot89xu0LGLXV8bJGen7dXU5aDztTEg=; b=kB8HS0UvJWhlf5IzVGJdPyFXvK/njyRpClG5gjQjLnRT0Wqb0Mj9ZpmcPKOGsI9FEg KStj38KbhLKGtKiy0DFMbi6Codrd8KKaaC/bM6XSjsmN2AqKgce/2rrbJvffZqlmEjss xrSiMjJ0cBGuqE6T39MxLJTnF0eA4Ex1Kb/fCo2IW725XO2DWmwHaj/NJ69+qU2OheaF jIlQ3MzvUcvlRNqfqF7ZcDamkEyqfgrcOpdCFfy0aDruOLvpzw+/INwA+1EiM1H4UFNX kOcb7hszWAFPHT6bCLXnC63gfHWLfwW3zvWVgeTtkg3aDBnN8Z8AP3Nh6YTcAGi9WZ00 2sXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:mime-version :content-transfer-encoding; bh=O2LwhUtYyFeJuot89xu0LGLXV8bJGen7dXU5aDztTEg=; b=OerYDGHnvsGB5kdQcZe8LES/PRcoCMm27D+8BUVUZr1Kj7FgBoSj0cpZrg3ndwpPkN HwEMXe91TzR87jQPpolPxZoH1m37f6HtNLar20KvVvqSJie+IMxHuXXn3cuhtLjbuUcn zccLhm6QCJCHocXoe3wJ1dSNADtm+kg0j2upDDnjqRzHeSIYBVVfPJPQBPEJHUh8aBFe NkSdBXKsGJULF9/3jL1YCoztq2Dwve5VEly7UjYn7b3bg08iNDgWe/tKeV0xWQWgqL+e mmeNOjhcy24eOtFYA9RQf1V1dd0YbLMXdFPW6Uv2JSL+wjUwxNCk15VBfrJbVCo0TPVW PAKA== X-Gm-Message-State: APf1xPDrWRb48lARqxGlUSeSnlYfubXvz937geSKMH+5Ro2LlbFONB0C Z/33dXGUifb71FcL95hBEXpAqOSD X-Google-Smtp-Source: AG47ELvMOkUInGXh+Gcyp1Q5Bzx7fjBkcP9sQYSYlktV1ok/PH4p9COiS9QBQs7eKScGb4BUijlGcA== X-Received: by 10.223.195.206 with SMTP id d14mr18302546wrg.0.1520364359352; Tue, 06 Mar 2018 11:25:59 -0800 (PST) Original-Received: from laptop ([77.70.2.229]) by smtp.gmail.com with ESMTPSA id q11sm18166690wrb.74.2018.03.06.11.25.57 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 06 Mar 2018 11:25:58 -0800 (PST) X-Mailer: Evolution 3.26.5 (3.26.5-1.fc27) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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:143964 Archived-At: 1. Open the following file (make sure you have write privilege) https://raw.githubusercontent.com/opencog/atomspace/master/tests/unify/ UnifyUTest.cxxtest 2. Enable c++-mode (M-x c++-mode) 3. Mark a large region of that file (say l.175 to the end) 4. Comment out that region (M-;) 5. Meditate in the church of Emacs for a few minutes If c++-mode is disabled (using fundamental-mode for instance) commenting that same region is instantaneous. After running some profiling it seems most of the CPU resources is spent in c-syntactic-skip-backward. The same slowness occurs with Emacs 25.1. I couldn't try older versions due to temacs Segfault compiling issue (unresolved by disabling randomize_va_space). In GNU Emacs 25.3.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.22.19) of 2017-09-15 built on buildvm-31.phx2.fedoraproject.org Windowing system distributor 'Fedora Project', version 11.0.11906000 Configured using: 'configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-dbus --with-gif --with-jpeg --with- png --with-rsvg --with-tiff --with-xft --with-xpm --with-x-toolkit=gtk3 --with-gpm=no --with-xwidgets --with-modules build_alias=x86_64-redhat-linux-gnu host_alias=x86_64-redhat-linux-gnu 'CFLAGS=-DMAIL_USE_LOCKF -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic' LDFLAGS=-Wl,-z,relro PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND DBUS GCONF GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 MODULES XWIDGETS Important settings: value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix Major mode: C++/l Minor modes in effect: tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t abbrev-mode: t Recent messages: Saved text until ", ts_expected)); } #undef al #undef an " Mark set [2 times] Saved text from "#include #inclu" Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message dired format-spec rfc822 mml mml-sec password-cache epg epg-config gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util help-fns mail-prsvr mail-utils cl-extra help-mode cc-mode cc-fonts easymenu cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs cl-loaddefs pcase cl-lib time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese charscript case-table epa- hook jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote dbusbind inotify dynamic-setting system-font-setting font-render-setting xwidget-internal move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 136237 5145) (symbols 48 21890 0) (miscs 40 56 157) (strings 32 19783 4769) (string-bytes 1 778551) (vectors 16 14190) (vector-slots 8 458261 5239) (floats 8 167 43) (intervals 56 9646 10) (buffers 976 18))