Reported by: Bastian Beischer <bastian.beischer <at> gmail.com>
Date: Tue, 6 Feb 2018 10:36:02 UTC
Severity: normal
Merged with 30849
Found in versions 26.0.91, 27.0.50
Fixed in version 27.1
Done: Alan Mackenzie <acm <at> muc.de>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 30367 in the body.
You can then email your comments to 30367 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
View this report as an mbox folder, status mbox, maintainer mbox
bug-gnu-emacs <at> gnu.org
:bug#30367
; Package emacs
.
(Tue, 06 Feb 2018 10:36:02 GMT) Full text and rfc822 format available.Bastian Beischer <bastian.beischer <at> gmail.com>
:bug-gnu-emacs <at> gnu.org
.
(Tue, 06 Feb 2018 10:36:02 GMT) Full text and rfc822 format available.Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Bastian Beischer <bastian.beischer <at> gmail.com> To: bug-gnu-emacs <at> gnu.org Subject: 26.0.91; CC-Mode: Major slowdown when isearching big C++ file. Date: Tue, 06 Feb 2018 11:34:43 +0100
After updating CC-Mode to the latest version in the standalone mercurial repository I noticed that searching large C++ files has become a lot slower than before (factor 20 or so). I traced the problem back to this commit: Author: Alan Mackenzie <bug-cc-mode <at> gnu.org> Date: Sun Jan 21 18:05:41 2018 +0000 Handle C99 Compound Literals in return statements and argument lists. * cc-engine.el (c-looking-at-or-maybe-in-bracelist): Recognize a brace list when preceded by "return" or inside parentheses, either immediately after the "(" or following a comma. (c-looking-at-inexpr-block): Test c-has-compound-literals rather than hard coded C++ Mode. (c-guess-basic-syntax, CASE 7B): Test additionally for not being just inside a parenthesis or being at a Java "new" keyword. CASE 9: Remove the simple minded test on the contents of a block to determine a brace list. * cc-langs.el (c-has-compound-literals): New lang const and lang var. * bracelist-30.{c,res}: New test files. I am attaching the result of a run of the emacs profiler before ("fast.profile") and after the commit ("slow.profile"). In this run I started emacs as: emacs -Q /path/to/big/file.C -e "(add-to-list 'load-path ~/cc-mode)" -e "(require 'cc-mode)" M-x profiler-start C-s searchString M-x profiler-report And write the result to 'slow.profile' and 'fast.profile' respectively. It appears that 93% of the time is spent in c-looking-at-or-maybe-in-bracelist. Thanks for looking into this issue! In GNU Emacs 26.0.91 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.26) of 2018-02-06 built on beischer-w520 Repository revision: c787a4968273027960a20ced6d63bae0d1ffa87e Windowing system distributor 'The X.Org Foundation', version 11.0.11906000 Recent messages: Checking 105 files in /usr/share/emacs/26.0.91/lisp/obsolete... Checking for load-path shadows...done Auto-saving...done Mark set Sending... Mark set [2 times] Sending via mail... Sending email Sending email done Sending...done Configured using: 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --localstatedir=/var --mandir=/usr/share/man --with-gameuser=:games --with-sound=alsa --with-xft --with-modules --with-x-toolkit=gtk3 --without-gconf --without-gsettings --without-gpm --without-m17n-flt --with-xwidgets --without-compress-install 'CFLAGS=-march=native -O2 -pipe -fstack-protector-strong -fno-plt' CPPFLAGS=-D_FORTIFY_SOURCE=2 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND DBUS NOTIFY ACL GNUTLS LIBXML2 FREETYPE LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 MODULES THREADS XWIDGETS LIBSYSTEMD LCMS2 Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Debbugs Minor modes in effect: helm-fuzzier-mode: t helm-flx-mode: t projectile-mode: t yas-global-mode: t yas-minor-mode: t window-numbering-mode: t diff-auto-refine-mode: t magit-auto-revert-mode: t global-git-commit-mode: t async-bytecomp-package-mode: t flx-ido-mode: t ido-everywhere: t global-srecode-minor-mode: t global-semanticdb-minor-mode: t global-semantic-idle-scheduler-mode: t global-semantic-decoration-mode: t global-semantic-highlight-func-mode: t global-semantic-stickyfunc-mode: t global-semantic-show-parser-state-mode: t semantic-mode: t global-ede-mode: t shell-dirtrack-mode: t show-paren-mode: t global-hi-lock-mode: t hi-lock-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t column-number-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: /home/beischer/.emacs.d/cedet/lisp/speedbar/loaddefs hides /home/beischer/.emacs.d/cedet/lisp/cedet/loaddefs /home/beischer/.emacs.d/elpa/cmake-mode-20180104.1137/cmake-mode hides /usr/share/emacs/site-lisp/cmake-mode /home/beischer/.emacs.d/cedet/lisp/speedbar/loaddefs hides /usr/share/emacs/26.0.91/lisp/loaddefs /usr/share/emacs/site-lisp/various/buff-menu hides /usr/share/emacs/26.0.91/lisp/buff-menu ~/.emacs.d/lisp/vc-cvs hides /usr/share/emacs/26.0.91/lisp/vc/vc-cvs ~/.emacs.d/cc-mode/cc-menus hides /usr/share/emacs/26.0.91/lisp/progmodes/cc-menus ~/.emacs.d/cc-mode/cc-fonts hides /usr/share/emacs/26.0.91/lisp/progmodes/cc-fonts ~/.emacs.d/cc-mode/cc-awk hides /usr/share/emacs/26.0.91/lisp/progmodes/cc-awk ~/.emacs.d/cc-mode/cc-align hides /usr/share/emacs/26.0.91/lisp/progmodes/cc-align ~/.emacs.d/cc-mode/cc-vars hides /usr/share/emacs/26.0.91/lisp/progmodes/cc-vars ~/.emacs.d/cc-mode/cc-bytecomp hides /usr/share/emacs/26.0.91/lisp/progmodes/cc-bytecomp ~/.emacs.d/cc-mode/cc-defs hides /usr/share/emacs/26.0.91/lisp/progmodes/cc-defs ~/.emacs.d/cc-mode/cc-langs hides /usr/share/emacs/26.0.91/lisp/progmodes/cc-langs ~/.emacs.d/cc-mode/cc-styles hides /usr/share/emacs/26.0.91/lisp/progmodes/cc-styles ~/.emacs.d/cc-mode/cc-cmds hides /usr/share/emacs/26.0.91/lisp/progmodes/cc-cmds ~/.emacs.d/cc-mode/cc-guess hides /usr/share/emacs/26.0.91/lisp/progmodes/cc-guess ~/.emacs.d/cc-mode/cc-engine hides /usr/share/emacs/26.0.91/lisp/progmodes/cc-engine ~/.emacs.d/cc-mode/cc-mode hides /usr/share/emacs/26.0.91/lisp/progmodes/cc-mode /home/beischer/.emacs.d/elpa/org-20180205/ox-icalendar hides /usr/share/emacs/26.0.91/lisp/org/ox-icalendar /home/beischer/.emacs.d/elpa/org-20180205/org-duration hides /usr/share/emacs/26.0.91/lisp/org/org-duration /home/beischer/.emacs.d/elpa/org-20180205/org-habit hides /usr/share/emacs/26.0.91/lisp/org/org-habit /home/beischer/.emacs.d/elpa/org-20180205/ob-C hides /usr/share/emacs/26.0.91/lisp/org/ob-C /home/beischer/.emacs.d/elpa/org-20180205/org-list hides /usr/share/emacs/26.0.91/lisp/org/org-list /home/beischer/.emacs.d/elpa/org-20180205/ob hides /usr/share/emacs/26.0.91/lisp/org/ob /home/beischer/.emacs.d/elpa/org-20180205/org-lint hides /usr/share/emacs/26.0.91/lisp/org/org-lint /home/beischer/.emacs.d/elpa/org-20180205/ob-mscgen hides /usr/share/emacs/26.0.91/lisp/org/ob-mscgen /home/beischer/.emacs.d/elpa/org-20180205/ob-awk hides /usr/share/emacs/26.0.91/lisp/org/ob-awk /home/beischer/.emacs.d/elpa/org-20180205/ox-html hides /usr/share/emacs/26.0.91/lisp/org/ox-html /home/beischer/.emacs.d/elpa/org-20180205/ob-eval hides /usr/share/emacs/26.0.91/lisp/org/ob-eval /home/beischer/.emacs.d/elpa/org-20180205/org-indent hides /usr/share/emacs/26.0.91/lisp/org/org-indent /home/beischer/.emacs.d/elpa/org-20180205/ob-coq hides /usr/share/emacs/26.0.91/lisp/org/ob-coq /home/beischer/.emacs.d/elpa/org-20180205/ob-js hides /usr/share/emacs/26.0.91/lisp/org/ob-js /home/beischer/.emacs.d/elpa/org-20180205/ob-groovy hides /usr/share/emacs/26.0.91/lisp/org/ob-groovy /home/beischer/.emacs.d/elpa/org-20180205/ob-sqlite hides /usr/share/emacs/26.0.91/lisp/org/ob-sqlite /home/beischer/.emacs.d/elpa/org-20180205/org-gnus hides /usr/share/emacs/26.0.91/lisp/org/org-gnus /home/beischer/.emacs.d/elpa/org-20180205/org-feed hides /usr/share/emacs/26.0.91/lisp/org/org-feed /home/beischer/.emacs.d/elpa/org-20180205/ob-ledger hides /usr/share/emacs/26.0.91/lisp/org/ob-ledger /home/beischer/.emacs.d/elpa/org-20180205/ob-processing hides /usr/share/emacs/26.0.91/lisp/org/ob-processing /home/beischer/.emacs.d/elpa/org-20180205/ob-io hides /usr/share/emacs/26.0.91/lisp/org/ob-io /home/beischer/.emacs.d/elpa/org-20180205/ob-keys hides /usr/share/emacs/26.0.91/lisp/org/ob-keys /home/beischer/.emacs.d/elpa/org-20180205/org-rmail hides /usr/share/emacs/26.0.91/lisp/org/org-rmail /home/beischer/.emacs.d/elpa/org-20180205/ob-ref hides /usr/share/emacs/26.0.91/lisp/org/ob-ref /home/beischer/.emacs.d/elpa/org-20180205/ob-lisp hides /usr/share/emacs/26.0.91/lisp/org/ob-lisp /home/beischer/.emacs.d/elpa/org-20180205/org-eshell hides /usr/share/emacs/26.0.91/lisp/org/org-eshell /home/beischer/.emacs.d/elpa/org-20180205/ox-latex hides /usr/share/emacs/26.0.91/lisp/org/ox-latex /home/beischer/.emacs.d/elpa/org-20180205/ob-ditaa hides /usr/share/emacs/26.0.91/lisp/org/ob-ditaa /home/beischer/.emacs.d/elpa/org-20180205/org-docview hides /usr/share/emacs/26.0.91/lisp/org/org-docview /home/beischer/.emacs.d/elpa/org-20180205/ob-tangle hides /usr/share/emacs/26.0.91/lisp/org/ob-tangle /home/beischer/.emacs.d/elpa/org-20180205/org-datetree hides /usr/share/emacs/26.0.91/lisp/org/org-datetree /home/beischer/.emacs.d/elpa/org-20180205/ob-org hides /usr/share/emacs/26.0.91/lisp/org/ob-org /home/beischer/.emacs.d/elpa/org-20180205/ob-lob hides /usr/share/emacs/26.0.91/lisp/org/ob-lob /home/beischer/.emacs.d/elpa/org-20180205/ox-md hides /usr/share/emacs/26.0.91/lisp/org/ox-md /home/beischer/.emacs.d/elpa/org-20180205/ob-screen hides /usr/share/emacs/26.0.91/lisp/org/ob-screen /home/beischer/.emacs.d/elpa/org-20180205/org-id hides /usr/share/emacs/26.0.91/lisp/org/org-id /home/beischer/.emacs.d/elpa/org-20180205/org-plot hides /usr/share/emacs/26.0.91/lisp/org/org-plot /home/beischer/.emacs.d/elpa/org-20180205/org hides /usr/share/emacs/26.0.91/lisp/org/org /home/beischer/.emacs.d/elpa/org-20180205/ob-emacs-lisp hides /usr/share/emacs/26.0.91/lisp/org/ob-emacs-lisp /home/beischer/.emacs.d/elpa/org-20180205/org-crypt hides /usr/share/emacs/26.0.91/lisp/org/org-crypt /home/beischer/.emacs.d/elpa/org-20180205/ob-python hides /usr/share/emacs/26.0.91/lisp/org/ob-python /home/beischer/.emacs.d/elpa/org-20180205/ob-table hides /usr/share/emacs/26.0.91/lisp/org/ob-table /home/beischer/.emacs.d/elpa/org-20180205/ob-clojure hides /usr/share/emacs/26.0.91/lisp/org/ob-clojure /home/beischer/.emacs.d/elpa/org-20180205/org-pcomplete hides /usr/share/emacs/26.0.91/lisp/org/org-pcomplete /home/beischer/.emacs.d/elpa/org-20180205/ob-sql hides /usr/share/emacs/26.0.91/lisp/org/ob-sql /home/beischer/.emacs.d/elpa/org-20180205/ob-scheme hides /usr/share/emacs/26.0.91/lisp/org/ob-scheme /home/beischer/.emacs.d/elpa/org-20180205/ob-abc hides /usr/share/emacs/26.0.91/lisp/org/ob-abc /home/beischer/.emacs.d/elpa/org-20180205/org-element hides /usr/share/emacs/26.0.91/lisp/org/org-element /home/beischer/.emacs.d/elpa/org-20180205/org-archive hides /usr/share/emacs/26.0.91/lisp/org/org-archive /home/beischer/.emacs.d/elpa/org-20180205/ob-dot hides /usr/share/emacs/26.0.91/lisp/org/ob-dot /home/beischer/.emacs.d/elpa/org-20180205/org-macro hides /usr/share/emacs/26.0.91/lisp/org/org-macro /home/beischer/.emacs.d/elpa/org-20180205/org-faces hides /usr/share/emacs/26.0.91/lisp/org/org-faces /home/beischer/.emacs.d/elpa/org-20180205/org-bibtex hides /usr/share/emacs/26.0.91/lisp/org/org-bibtex /home/beischer/.emacs.d/elpa/org-20180205/ob-ebnf hides /usr/share/emacs/26.0.91/lisp/org/ob-ebnf /home/beischer/.emacs.d/elpa/org-20180205/org-colview hides /usr/share/emacs/26.0.91/lisp/org/org-colview /home/beischer/.emacs.d/elpa/org-20180205/ob-ocaml hides /usr/share/emacs/26.0.91/lisp/org/ob-ocaml /home/beischer/.emacs.d/elpa/org-20180205/ox-publish hides /usr/share/emacs/26.0.91/lisp/org/ox-publish /home/beischer/.emacs.d/elpa/org-20180205/org-eww hides /usr/share/emacs/26.0.91/lisp/org/org-eww /home/beischer/.emacs.d/elpa/org-20180205/org-agenda hides /usr/share/emacs/26.0.91/lisp/org/org-agenda /home/beischer/.emacs.d/elpa/org-20180205/org-mhe hides /usr/share/emacs/26.0.91/lisp/org/org-mhe /home/beischer/.emacs.d/elpa/org-20180205/ox-odt hides /usr/share/emacs/26.0.91/lisp/org/ox-odt /home/beischer/.emacs.d/elpa/org-20180205/ob-lua hides /usr/share/emacs/26.0.91/lisp/org/ob-lua /home/beischer/.emacs.d/elpa/org-20180205/org-attach hides /usr/share/emacs/26.0.91/lisp/org/org-attach /home/beischer/.emacs.d/elpa/org-20180205/ob-hledger hides /usr/share/emacs/26.0.91/lisp/org/ob-hledger /home/beischer/.emacs.d/elpa/org-20180205/ob-comint hides /usr/share/emacs/26.0.91/lisp/org/ob-comint /home/beischer/.emacs.d/elpa/org-20180205/org-install hides /usr/share/emacs/26.0.91/lisp/org/org-install /home/beischer/.emacs.d/elpa/org-20180205/ob-fortran hides /usr/share/emacs/26.0.91/lisp/org/ob-fortran /home/beischer/.emacs.d/elpa/org-20180205/ox-ascii hides /usr/share/emacs/26.0.91/lisp/org/ox-ascii /home/beischer/.emacs.d/elpa/org-20180205/ob-shell hides /usr/share/emacs/26.0.91/lisp/org/ob-shell /home/beischer/.emacs.d/elpa/org-20180205/ob-haskell hides /usr/share/emacs/26.0.91/lisp/org/ob-haskell /home/beischer/.emacs.d/elpa/org-20180205/org-info hides /usr/share/emacs/26.0.91/lisp/org/org-info /home/beischer/.emacs.d/elpa/org-20180205/ob-shen hides /usr/share/emacs/26.0.91/lisp/org/ob-shen /home/beischer/.emacs.d/elpa/org-20180205/ox-texinfo hides /usr/share/emacs/26.0.91/lisp/org/ox-texinfo /home/beischer/.emacs.d/elpa/org-20180205/org-clock hides /usr/share/emacs/26.0.91/lisp/org/org-clock /home/beischer/.emacs.d/elpa/org-20180205/ob-vala hides /usr/share/emacs/26.0.91/lisp/org/ob-vala /home/beischer/.emacs.d/elpa/org-20180205/org-src hides /usr/share/emacs/26.0.91/lisp/org/org-src /home/beischer/.emacs.d/elpa/org-20180205/ob-J hides /usr/share/emacs/26.0.91/lisp/org/ob-J /home/beischer/.emacs.d/elpa/org-20180205/org-capture hides /usr/share/emacs/26.0.91/lisp/org/org-capture /home/beischer/.emacs.d/elpa/org-20180205/ox-beamer hides /usr/share/emacs/26.0.91/lisp/org/ox-beamer /home/beischer/.emacs.d/elpa/org-20180205/org-footnote hides /usr/share/emacs/26.0.91/lisp/org/org-footnote /home/beischer/.emacs.d/elpa/org-20180205/org-protocol hides /usr/share/emacs/26.0.91/lisp/org/org-protocol /home/beischer/.emacs.d/elpa/org-20180205/org-ctags hides /usr/share/emacs/26.0.91/lisp/org/org-ctags /home/beischer/.emacs.d/elpa/org-20180205/org-bbdb hides /usr/share/emacs/26.0.91/lisp/org/org-bbdb /home/beischer/.emacs.d/elpa/org-20180205/ob-R hides /usr/share/emacs/26.0.91/lisp/org/ob-R /home/beischer/.emacs.d/elpa/org-20180205/ob-matlab hides /usr/share/emacs/26.0.91/lisp/org/ob-matlab /home/beischer/.emacs.d/elpa/org-20180205/ox-org hides /usr/share/emacs/26.0.91/lisp/org/ox-org /home/beischer/.emacs.d/elpa/org-20180205/org-w3m hides /usr/share/emacs/26.0.91/lisp/org/org-w3m /home/beischer/.emacs.d/elpa/org-20180205/ob-sass hides /usr/share/emacs/26.0.91/lisp/org/ob-sass /home/beischer/.emacs.d/elpa/org-20180205/org-mobile hides /usr/share/emacs/26.0.91/lisp/org/org-mobile /home/beischer/.emacs.d/elpa/org-20180205/org-timer hides /usr/share/emacs/26.0.91/lisp/org/org-timer /home/beischer/.emacs.d/elpa/org-20180205/ox-man hides /usr/share/emacs/26.0.91/lisp/org/ox-man /home/beischer/.emacs.d/elpa/org-20180205/ob-plantuml hides /usr/share/emacs/26.0.91/lisp/org/ob-plantuml /home/beischer/.emacs.d/elpa/org-20180205/ob-css hides /usr/share/emacs/26.0.91/lisp/org/ob-css /home/beischer/.emacs.d/elpa/org-20180205/ob-perl hides /usr/share/emacs/26.0.91/lisp/org/ob-perl /home/beischer/.emacs.d/elpa/org-20180205/org-irc hides /usr/share/emacs/26.0.91/lisp/org/org-irc /home/beischer/.emacs.d/elpa/org-20180205/ob-makefile hides /usr/share/emacs/26.0.91/lisp/org/ob-makefile /home/beischer/.emacs.d/elpa/org-20180205/org-loaddefs hides /usr/share/emacs/26.0.91/lisp/org/org-loaddefs /home/beischer/.emacs.d/elpa/org-20180205/ob-lilypond hides /usr/share/emacs/26.0.91/lisp/org/ob-lilypond /home/beischer/.emacs.d/elpa/org-20180205/ob-picolisp hides /usr/share/emacs/26.0.91/lisp/org/ob-picolisp /home/beischer/.emacs.d/elpa/org-20180205/org-inlinetask hides /usr/share/emacs/26.0.91/lisp/org/org-inlinetask /home/beischer/.emacs.d/elpa/org-20180205/org-mouse hides /usr/share/emacs/26.0.91/lisp/org/org-mouse /home/beischer/.emacs.d/elpa/org-20180205/ob-gnuplot hides /usr/share/emacs/26.0.91/lisp/org/ob-gnuplot /home/beischer/.emacs.d/elpa/org-20180205/ob-maxima hides /usr/share/emacs/26.0.91/lisp/org/ob-maxima /home/beischer/.emacs.d/elpa/org-20180205/ob-exp hides /usr/share/emacs/26.0.91/lisp/org/ob-exp /home/beischer/.emacs.d/elpa/org-20180205/org-macs hides /usr/share/emacs/26.0.91/lisp/org/org-macs /home/beischer/.emacs.d/elpa/org-20180205/ox hides /usr/share/emacs/26.0.91/lisp/org/ox /home/beischer/.emacs.d/elpa/org-20180205/org-entities hides /usr/share/emacs/26.0.91/lisp/org/org-entities /home/beischer/.emacs.d/elpa/org-20180205/org-compat hides /usr/share/emacs/26.0.91/lisp/org/org-compat /home/beischer/.emacs.d/elpa/org-20180205/ob-octave hides /usr/share/emacs/26.0.91/lisp/org/ob-octave /home/beischer/.emacs.d/elpa/org-20180205/ob-ruby hides /usr/share/emacs/26.0.91/lisp/org/ob-ruby /home/beischer/.emacs.d/elpa/org-20180205/org-table hides /usr/share/emacs/26.0.91/lisp/org/org-table /home/beischer/.emacs.d/elpa/org-20180205/ob-core hides /usr/share/emacs/26.0.91/lisp/org/ob-core /home/beischer/.emacs.d/elpa/org-20180205/ob-sed hides /usr/share/emacs/26.0.91/lisp/org/ob-sed /home/beischer/.emacs.d/elpa/org-20180205/ob-asymptote hides /usr/share/emacs/26.0.91/lisp/org/ob-asymptote /home/beischer/.emacs.d/elpa/org-20180205/ob-forth hides /usr/share/emacs/26.0.91/lisp/org/ob-forth /home/beischer/.emacs.d/elpa/org-20180205/ob-calc hides /usr/share/emacs/26.0.91/lisp/org/ob-calc /home/beischer/.emacs.d/elpa/org-20180205/org-version hides /usr/share/emacs/26.0.91/lisp/org/org-version /home/beischer/.emacs.d/elpa/org-20180205/ob-latex hides /usr/share/emacs/26.0.91/lisp/org/ob-latex /home/beischer/.emacs.d/elpa/org-20180205/ob-java hides /usr/share/emacs/26.0.91/lisp/org/ob-java /home/beischer/.emacs.d/elpa/org-20180205/ob-stan hides /usr/share/emacs/26.0.91/lisp/org/ob-stan Features: (mailalias smtpmail whitespace cap-words superword subword semantic/tag-file function-args semantic-directory semantic/ia semantic/db-file semantic/adebug eieio-datadebug data-debug cedet-files pp shadow sort mail-extr emacsbug sendmail gnus-async gnus-agent gnus-srvr gnus-score score-mode nnvirtual nntp gnus-ml gnus-msg nndoc gnus-cache gnus-dup gnus-art mm-uu mml2015 mm-view mml-smime smime dig gnus-sum gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo gnus-spec gnus-int gnus-range gnus-win gnus nnheader misearch multi-isearch mm-archive network-stream starttls url-cache debbugs-gnu debbugs soap-client url-http tls gnutls url-gw nsm rng-xsd rng-dt rng-util xsd-regexp xml ido-completing-read+ memoize cus-edit minibuf-eldef company-oddmuse company-keywords company-etags company-gtags company-dabbrev-code company-dabbrev company-files company-capf company-cmake company-xcode company-clang company-semantic company-eclim company-template company-css company-nxml company-bbdb company-edbi edbi sql view jedi jedi-core python-environment epc ctable concurrent deferred subr-x auto-complete popup cmake-project helm-fuzzier helm helm-source helm-multi-match helm-lib helm-flx tempo xml-parse doxymacs projectile ibuf-ext ibuffer ibuffer-loaddefs dropdown-list yasnippet elec-pair my-term term disp-table ehelp etags-table etags xref project cmake-mode rx qt-pro pastebin window-numbering company magit-topgit magit-obsolete magit-blame magit-stash magit-bisect magit-remote magit-commit magit-sequence magit-notes magit-worktree magit-tag magit-merge magit-branch magit-reset magit-collab ghub url-auth url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap let-alist json map magit-files magit-refs magit-status magit magit-repos magit-apply magit-wip magit-log magit-diff smerge-mode diff-mode magit-core magit-autorevert autorevert filenotify magit-process magit-margin magit-mode git-commit recentf tree-widget magit-git magit-section magit-utils crm magit-popup log-edit message rmc puny rfc822 mml mml-sec epa derived epg gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader pcvs-util add-log with-editor cl-extra help-mode async-bytecomp async server buff-menu+ hideshow flx-ido ido dired-x dired dired-loaddefs ede/cpp-root srecode/mode semantic/senator srecode/insert srecode/filters srecode/args semantic/db-mode f dash cl s semantic/bovine/c hideif semantic/bovine/c-by semantic/lex-spp semantic/idle working fame semantic/bovine/gcc semantic/dep semantic/bovine semantic/analyze/refs semantic/decorate/include semantic/db-find semantic/db-ref semantic/decorate/mode semantic/decorate pulse cedet-devel-load cogre/srecode cogre cogre/picture-hack rect picture eieio-opt srecode/find srecode/map semantic/edit srecode/srt-mode srecode/template srecode/srt-wy semantic/wisent semantic/wisent/wisent srecode/ctxt srecode/compile srecode/dictionary srecode/table srecode semantic/canned-configs semantic/ia-sb semantic/analyze semantic/sort semantic/scope semantic/analyze/fcn semantic/db semantic/ctxt semantic/format semantic/tag-ls semantic/find semantic/util-modes semantic/util semantic semantic/tag semantic/lex semantic/fw mode-local sb-info ede/speedbar ede/files ede ede/detect ede/base ede/auto ede/source eieio-compat eieio-base eieio-speedbar speedbar sb-image ezimage dframe eieio-custom wid-edit cedet cedet-compat inversion cedet-remove-builtin cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs flymake-proc flymake warnings ams-meeting org-element avl-tree generator org org-macro org-footnote org-pcomplete org-list org-faces org-entities noutline outline easy-mmode org-version ob-emacs-lisp ob ob-tangle org-src ob-ref ob-lob ob-table ob-keys ob-exp ob-comint ob-core ob-eval org-compat org-macs org-loaddefs find-func cal-menu calendar cal-loaddefs calc-mouse calc-yank calc-ext calc calc-loaddefs calc-macs hide-lines ivy flx delsel ivy-overlay ffap thingatpt vc-cvs vc vc-dispatcher pcase finder-inf tex-site info package easymenu epg-config url-handlers url-parse url-vars seq edmacro kmacro emacs-x-theme tramp tramp-compat tramp-loaddefs trampver ucs-normalize shell pcomplete parse-time format-spec advice auth-source cl-seq eieio byte-opt bytecomp byte-compile cconv eieio-core cl-macs gv eieio-loaddefs cl-loaddefs cl-lib password-cache time-date paren grep compile comint ansi-color ring linum hi-lock cus-start cus-load mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors 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 composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray 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 lcms2 dynamic-setting font-render-setting xwidget-internal move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 1357278 26063) (symbols 48 67917 28) (miscs 40 146 336) (strings 32 284041 2833) (string-bytes 1 7395955) (vectors 16 117016) (vector-slots 8 1733583 19848) (floats 8 4974 1122) (intervals 56 34110 165) (buffers 992 22))
bug-gnu-emacs <at> gnu.org
:bug#30367
; Package emacs
.
(Tue, 06 Feb 2018 10:41:01 GMT) Full text and rfc822 format available.Message #8 received at 30367 <at> debbugs.gnu.org (full text, mbox):
From: Bastian Beischer <bastian.beischer <at> gmail.com> To: 30367 <at> debbugs.gnu.org Subject: Re: bug#30367: 26.0.91; CC-Mode: Major slowdown when isearching big C++ file. Date: Tue, 06 Feb 2018 11:40:31 +0100
[Message part 1 (text/plain, inline)]
I forgot to attach the profile files. Here they are.
[fast.profile (application/octet-stream, attachment)]
[slow.profile (application/octet-stream, attachment)]
bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org
:bug#30367
; Package emacs,cc-mode
.
(Wed, 07 Feb 2018 15:25:02 GMT) Full text and rfc822 format available.Message #11 received at 30367 <at> debbugs.gnu.org (full text, mbox):
From: Alan Mackenzie <acm <at> muc.de> To: Bastian Beischer <bastian.beischer <at> gmail.com> Cc: 30367 <at> debbugs.gnu.org Subject: Re: bug#30367: 26.0.91; CC-Mode: Major slowdown when isearching big C++ file. Date: 7 Feb 2018 15:24:35 -0000
Hello, Bastian. In article <mailman.8662.1517913372.27995.bug-gnu-emacs <at> gnu.org> you wrote: > After updating CC-Mode to the latest version in the standalone mercurial > repository I noticed that searching large C++ files has become a lot > slower than before (factor 20 or so). Thanks for taking the trouble to report this bug. How large is large? Any chance you could supply me with such a sample C++ file that is slow on searching. Then, in case something else besides the size is slowing it down, I'll have a "working" file to diagnose the bug with. > I traced the problem back to this commit: > Author: Alan Mackenzie <bug-cc-mode <at> gnu.org> > Date: Sun Jan 21 18:05:41 2018 +0000 > Handle C99 Compound Literals in return statements and argument lists. > > * cc-engine.el (c-looking-at-or-maybe-in-bracelist): Recognize a brace list > when preceded by "return" or inside parentheses, either immediately after the > "(" or following a comma. > (c-looking-at-inexpr-block): Test c-has-compound-literals rather than hard > coded C++ Mode. > (c-guess-basic-syntax, CASE 7B): Test additionally for not being just inside a > parenthesis or being at a Java "new" keyword. CASE 9: Remove the simple > minded test on the contents of a block to determine a brace list. > > * cc-langs.el (c-has-compound-literals): New lang const and lang var. > > * bracelist-30.{c,res}: New test files. Thanks for getting this information. This should help track down the problem. > I am attaching the result of a run of the emacs profiler before > ("fast.profile") and after the commit ("slow.profile"). In this run I > started emacs as: > emacs -Q /path/to/big/file.C -e "(add-to-list 'load-path ~/cc-mode)" -e "(require 'cc-mode)" > M-x profiler-start > C-s searchString > M-x profiler-report > And write the result to 'slow.profile' and 'fast.profile' > respectively. It appears that 93% of the time is spent in > c-looking-at-or-maybe-in-bracelist. > Thanks for looking into this issue! Just as a matter of interest, you can post CC Mode bugs direct to bug-cc-mode <at> gnu.org. Sometimes a CC Mode dump produced by C-c C-b can be useful, though I don't think it would help much here. > In GNU Emacs 26.0.91 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.26) > of 2018-02-06 built on beischer-w520 > Repository revision: c787a4968273027960a20ced6d63bae0d1ffa87e > Windowing system distributor 'The X.Org Foundation', version 11.0.11906000 [ .... ] -- Alan Mackenzie (Nuremberg, Germany).
bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org
:bug#30367
; Package emacs,cc-mode
.
(Wed, 07 Feb 2018 15:28:02 GMT) Full text and rfc822 format available.Message #14 received at 30367 <at> debbugs.gnu.org (full text, mbox):
From: Bastian Beischer <bastian.beischer <at> gmail.com> To: Alan Mackenzie <acm <at> muc.de> Cc: 30367 <at> debbugs.gnu.org Subject: Re: bug#30367: 26.0.91; CC-Mode: Major slowdown when isearching big C++ file. Date: Wed, 7 Feb 2018 16:27:35 +0100
[Message part 1 (text/plain, inline)]
Hello Alan, On Wed, Feb 7, 2018 at 4:24 PM, Alan Mackenzie <acm <at> muc.de> wrote: > Hello, Bastian. > > In article <mailman.8662.1517913372.27995.bug-gnu-emacs <at> gnu.org> you > wrote: > > > After updating CC-Mode to the latest version in the standalone mercurial > > repository I noticed that searching large C++ files has become a lot > > slower than before (factor 20 or so). > > Thanks for taking the trouble to report this bug. > > How large is large? Any chance you could supply me with such a sample > C++ file that is slow on searching. Then, in case something else > besides the size is slowing it down, I'll have a "working" file to > diagnose the bug with. > Sure, but I will send you the file off-list, since I don't want it to become public. > > > I traced the problem back to this commit: > > > Author: Alan Mackenzie <bug-cc-mode <at> gnu.org> > > Date: Sun Jan 21 18:05:41 2018 +0000 > > > Handle C99 Compound Literals in return statements and argument lists. > > > > * cc-engine.el (c-looking-at-or-maybe-in-bracelist): Recognize a > brace list > > when preceded by "return" or inside parentheses, either immediately > after the > > "(" or following a comma. > > (c-looking-at-inexpr-block): Test c-has-compound-literals rather > than hard > > coded C++ Mode. > > (c-guess-basic-syntax, CASE 7B): Test additionally for not being > just inside a > > parenthesis or being at a Java "new" keyword. CASE 9: Remove the > simple > > minded test on the contents of a block to determine a brace list. > > > > * cc-langs.el (c-has-compound-literals): New lang const and lang var. > > > > * bracelist-30.{c,res}: New test files. > > Thanks for getting this information. This should help track down the > problem. > > > I am attaching the result of a run of the emacs profiler before > > ("fast.profile") and after the commit ("slow.profile"). In this run I > > started emacs as: > > > emacs -Q /path/to/big/file.C -e "(add-to-list 'load-path ~/cc-mode)" -e > "(require 'cc-mode)" > > M-x profiler-start > > C-s searchString > > M-x profiler-report > > > And write the result to 'slow.profile' and 'fast.profile' > > respectively. It appears that 93% of the time is spent in > > c-looking-at-or-maybe-in-bracelist. > > > Thanks for looking into this issue! > > Just as a matter of interest, you can post CC Mode bugs direct to > bug-cc-mode <at> gnu.org. Sometimes a CC Mode dump produced by C-c C-b can > be useful, though I don't think it would help much here. > Sorry, I didn't know that and will do it next time! > > > > In GNU Emacs 26.0.91 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.26) > > of 2018-02-06 built on beischer-w520 > > Repository revision: c787a4968273027960a20ced6d63bae0d1ffa87e > > Windowing system distributor 'The X.Org Foundation', version > 11.0.11906000 > > [ .... ] > > -- > Alan Mackenzie (Nuremberg, Germany). > Cheers Bastian
[Message part 2 (text/html, inline)]
bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org
:bug#30367
; Package emacs,cc-mode
.
(Wed, 07 Feb 2018 21:33:02 GMT) Full text and rfc822 format available.Message #17 received at 30367 <at> debbugs.gnu.org (full text, mbox):
From: Alan Mackenzie <acm <at> muc.de> To: Bastian Beischer <bastian.beischer <at> gmail.com> Cc: 30367 <at> debbugs.gnu.org Subject: Re: bug#30367: 26.0.91; CC-Mode: Major slowdown when isearching big C++ file. Date: Wed, 7 Feb 2018 21:21:45 +0000
Hello, Bastian. That was quick work. :-) On Wed, Feb 07, 2018 at 16:27:35 +0100, Bastian Beischer wrote: > Hello Alan, > On Wed, Feb 7, 2018 at 4:24 PM, Alan Mackenzie <acm <at> muc.de> wrote: > > Hello, Bastian. > > In article <mailman.8662.1517913372.27995.bug-gnu-emacs <at> gnu.org> you > > wrote: > > > After updating CC-Mode to the latest version in the standalone mercurial > > > repository I noticed that searching large C++ files has become a lot > > > slower than before (factor 20 or so). > > Thanks for taking the trouble to report this bug. > > How large is large? Any chance you could supply me with such a sample > > C++ file that is slow on searching. Then, in case something else > > besides the size is slowing it down, I'll have a "working" file to > > diagnose the bug with. > Sure, but I will send you the file off-list, since I don't want it to > become public. > I've got the file you sent me, thanks very much, and I will treat it as confidential. Unfortunately, I cannot reproduce the slowdown in that file, at least, not starting from emacs-26.0.91 -Q. I think you've got quite a lot of non-default minor modes active, and I've a suspicion that we're seeing some interaction between CC Mode and one of these minor modes, or possibly some other non-default setting you've got set. Would you please try to reproduce the problem with emacs -Q, and if you can't, try to pinpoint which one of your settings/minor modes is the one which CC Mode is working badly with. We'll crack this! > Cheers > Bastian -- Alan Mackenzie (Nuremberg, Germany).
bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org
:bug#30367
; Package emacs,cc-mode
.
(Wed, 07 Feb 2018 21:54:01 GMT) Full text and rfc822 format available.Message #20 received at 30367 <at> debbugs.gnu.org (full text, mbox):
From: Bastian Beischer <bastian.beischer <at> gmail.com> To: Alan Mackenzie <acm <at> muc.de> Cc: 30367 <at> debbugs.gnu.org Subject: Re: bug#30367: 26.0.91; CC-Mode: Major slowdown when isearching big C++ file. Date: Wed, 7 Feb 2018 22:53:47 +0100
Hello Alan, On Wed, Feb 7, 2018 at 10:21 PM, Alan Mackenzie <acm <at> muc.de> wrote: > > Hello, Bastian. > > That was quick work. :-) > > On Wed, Feb 07, 2018 at 16:27:35 +0100, Bastian Beischer wrote: > > Hello Alan, > > > On Wed, Feb 7, 2018 at 4:24 PM, Alan Mackenzie <acm <at> muc.de> wrote: > > > > Hello, Bastian. > > > > In article <mailman.8662.1517913372.27995.bug-gnu-emacs <at> gnu.org> you > > > wrote: > > > > > After updating CC-Mode to the latest version in the standalone mercurial > > > > repository I noticed that searching large C++ files has become a lot > > > > slower than before (factor 20 or so). > > > > Thanks for taking the trouble to report this bug. > > > > How large is large? Any chance you could supply me with such a sample > > > C++ file that is slow on searching. Then, in case something else > > > besides the size is slowing it down, I'll have a "working" file to > > > diagnose the bug with. > > > > Sure, but I will send you the file off-list, since I don't want it to > > become public. > > > > I've got the file you sent me, thanks very much, and I will treat it as > confidential. > > Unfortunately, I cannot reproduce the slowdown in that file, at least, > not starting from emacs-26.0.91 -Q. I think you've got quite a lot of > non-default minor modes active, and I've a suspicion that we're seeing > some interaction between CC Mode and one of these minor modes, or > possibly some other non-default setting you've got set. > > Would you please try to reproduce the problem with emacs -Q, and if you > can't, try to pinpoint which one of your settings/minor modes is the one > which CC Mode is working badly with. Actually the profile runs I sent were done with 'emacs -Q'. It's just that I used a different emacs instance to report the bug, which had the usual modes loaded. Sorry about that. So I can reproduce the problem from emacs -Q, but I _do_ load the latest cc-mode from it's standalone repository. The actual command was: emacs -Q --eval "(add-to-list 'load-path \"~/cc-mode\")" --eval "(require 'cc-mode)" /path/to/file.C then search for 'isinsha'. ~/cc-mode revision is as follows: $ cd ~/cc-mode $ hg summary parent: 6256:e8b2c6141f97 Added tag 2018-01-29-mac-m for changeset 9785123a85b4 branch: default commit: (clean) update: (current) emacs version is as in the original report (GNU Emacs 26.0.91 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.26) of 2018-02-06, commit c787a4968273027960a20ced6d63bae0d1ffa87e) > > > We'll crack this! I'm sure :-) > > > > Cheers > > Bastian > > -- > Alan Mackenzie (Nuremberg, Germany). Cheers Bastian
bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org
:bug#30367
; Package emacs,cc-mode
.
(Wed, 07 Feb 2018 22:37:01 GMT) Full text and rfc822 format available.Message #23 received at 30367 <at> debbugs.gnu.org (full text, mbox):
From: Alan Mackenzie <acm <at> muc.de> To: Bastian Beischer <bastian.beischer <at> gmail.com> Cc: 30367 <at> debbugs.gnu.org Subject: Re: bug#30367: 26.0.91; CC-Mode: Major slowdown when isearching big C++ file. Date: Wed, 7 Feb 2018 22:26:38 +0000
Hello, Bastian. On Wed, Feb 07, 2018 at 22:53:47 +0100, Bastian Beischer wrote: > Hello Alan, > On Wed, Feb 7, 2018 at 10:21 PM, Alan Mackenzie <acm <at> muc.de> wrote: [ .... ] > > Unfortunately, I cannot reproduce the slowdown in that file, at least, > > not starting from emacs-26.0.91 -Q. I think you've got quite a lot of > > non-default minor modes active, and I've a suspicion that we're seeing > > some interaction between CC Mode and one of these minor modes, or > > possibly some other non-default setting you've got set. > > Would you please try to reproduce the problem with emacs -Q, and if you > > can't, try to pinpoint which one of your settings/minor modes is the one > > which CC Mode is working badly with. > Actually the profile runs I sent were done with 'emacs -Q'. It's just > that I used a different emacs instance to report the bug, which had > the usual modes loaded. Sorry about that. So I can reproduce the > problem from emacs -Q, but I _do_ load the latest cc-mode from it's > standalone repository. The actual command was: > emacs -Q --eval "(add-to-list 'load-path \"~/cc-mode\")" --eval > "(require 'cc-mode)" /path/to/file.C As a matter of interest, you can run emacs -Q -L ~/cc-mode /path/to/file.C , this being less effort to type. (I don't understand why you've got the `require' form in there - maybe you really do need it.) :-) > 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! > ~/cc-mode revision is as follows: > $ cd ~/cc-mode > $ hg summary > parent: 6256:e8b2c6141f97 > Added tag 2018-01-29-mac-m for changeset 9785123a85b4 > branch: default > commit: (clean) > update: (current) Thanks. I actually run the tip of the standalone CC Mode as my default CC Mode anyway, since I'm so often working on it. > emacs version is as in the original report (GNU Emacs 26.0.91 (build > 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.26) of 2018-02-06, commit > c787a4968273027960a20ced6d63bae0d1ffa87e) > > We'll crack this! > I'm sure :-) Just not tonight. ;-) > Cheers > Bastian -- Alan Mackenzie (Nuremberg, Germany).
bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org
:bug#30367
; Package emacs,cc-mode
.
(Wed, 07 Feb 2018 22:46:02 GMT) Full text and rfc822 format available.Message #26 received at 30367 <at> debbugs.gnu.org (full text, mbox):
From: Bastian Beischer <bastian.beischer <at> gmail.com> To: Alan Mackenzie <acm <at> muc.de> Cc: 30367 <at> debbugs.gnu.org Subject: Re: bug#30367: 26.0.91; CC-Mode: Major slowdown when isearching big C++ file. Date: Wed, 7 Feb 2018 23:45:03 +0100
On Wed, Feb 7, 2018 at 11:26 PM, Alan Mackenzie <acm <at> muc.de> wrote: > Hello, Bastian. > > On Wed, Feb 07, 2018 at 22:53:47 +0100, Bastian Beischer wrote: >> Hello Alan, > >> On Wed, Feb 7, 2018 at 10:21 PM, Alan Mackenzie <acm <at> muc.de> wrote: > > [ .... ] > >> > Unfortunately, I cannot reproduce the slowdown in that file, at least, >> > not starting from emacs-26.0.91 -Q. I think you've got quite a lot of >> > non-default minor modes active, and I've a suspicion that we're seeing >> > some interaction between CC Mode and one of these minor modes, or >> > possibly some other non-default setting you've got set. > >> > Would you please try to reproduce the problem with emacs -Q, and if you >> > can't, try to pinpoint which one of your settings/minor modes is the one >> > which CC Mode is working badly with. > >> Actually the profile runs I sent were done with 'emacs -Q'. It's just >> that I used a different emacs instance to report the bug, which had >> the usual modes loaded. Sorry about that. So I can reproduce the >> problem from emacs -Q, but I _do_ load the latest cc-mode from it's >> standalone repository. The actual command was: > >> emacs -Q --eval "(add-to-list 'load-path \"~/cc-mode\")" --eval >> "(require 'cc-mode)" /path/to/file.C > > As a matter of interest, you can run > > emacs -Q -L ~/cc-mode /path/to/file.C > > , this being less effort to type. (I don't understand why you've got the > `require' form in there - maybe you really do need it.) :-) Yes the command you sent works just as well, so the require form is not needed. Thanks! > >> 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. > >> ~/cc-mode revision is as follows: > >> $ cd ~/cc-mode >> $ hg summary >> parent: 6256:e8b2c6141f97 >> Added tag 2018-01-29-mac-m for changeset 9785123a85b4 >> branch: default >> commit: (clean) >> update: (current) > > Thanks. I actually run the tip of the standalone CC Mode as my default > CC Mode anyway, since I'm so often working on it. > >> emacs version is as in the original report (GNU Emacs 26.0.91 (build >> 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.26) of 2018-02-06, commit >> c787a4968273027960a20ced6d63bae0d1ffa87e) > > > >> > We'll crack this! > >> I'm sure :-) > > Just not tonight. ;-) > >> Cheers >> Bastian > > -- > Alan Mackenzie (Nuremberg, Germany).
bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org
:bug#30367
; Package emacs,cc-mode
.
(Thu, 08 Feb 2018 17:37:01 GMT) Full text and rfc822 format available.Message #29 received at 30367 <at> debbugs.gnu.org (full text, mbox):
From: Alan Mackenzie <acm <at> muc.de> To: Bastian Beischer <bastian.beischer <at> gmail.com> Cc: 30367 <at> debbugs.gnu.org Subject: Re: bug#30367: 26.0.91; CC-Mode: Major slowdown when isearching big C++ file. Date: Thu, 8 Feb 2018 17:25:58 +0000
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 <acm <at> muc.de> 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).
bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org
:bug#30367
; Package emacs,cc-mode
.
(Thu, 08 Feb 2018 18:54:02 GMT) Full text and rfc822 format available.Message #32 received at 30367 <at> debbugs.gnu.org (full text, mbox):
From: Alan Mackenzie <acm <at> muc.de> To: Bastian Beischer <bastian.beischer <at> gmail.com> Cc: 30367 <at> debbugs.gnu.org Subject: Re: bug#30367: 26.0.91; CC-Mode: Major slowdown when isearching big C++ file. Date: Thu, 8 Feb 2018 18:42:32 +0000
On Thu, Feb 08, 2018 at 17:25:58 +0000, Alan Mackenzie wrote: > Hello, Bastian. [ .... ] > 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). Actually, that cond arm with the `c-go-up-list-backward' was merely an "optimisation". :-( If I simply remove it, the code goes ~30 times faster, without triggering any successes in the test suite. 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. [ .... ] > > Cheers > > Bastian -- Alan Mackenzie (Nuremberg, Germany). > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org
:bug#30367
; Package emacs,cc-mode
.
(Fri, 09 Feb 2018 09:18:02 GMT) Full text and rfc822 format available.Message #35 received at 30367 <at> debbugs.gnu.org (full text, mbox):
From: Bastian Beischer <bastian.beischer <at> gmail.com> To: Alan Mackenzie <acm <at> muc.de> Cc: 30367 <at> debbugs.gnu.org Subject: Re: bug#30367: 26.0.91; CC-Mode: Major slowdown when isearching big C++ file. Date: Fri, 09 Feb 2018 10:16:53 +0100
Hello Alan, Alan Mackenzie <acm <at> muc.de> writes: > On Thu, Feb 08, 2018 at 17:25:58 +0000, Alan Mackenzie wrote: >> Hello, Bastian. > > [ .... ] > >> 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). > > Actually, that cond arm with the `c-go-up-list-backward' was merely an > "optimisation". :-( If I simply remove it, the code goes ~30 times > faster, without triggering any successes in the test suite. > > 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. I will run emacs with the patch included for a while and will let you know in case I find any problems! Thanks for tackling this so quickly! >> > Cheers >> > Bastian
Alan Mackenzie <acm <at> muc.de>
:Bastian Beischer <bastian.beischer <at> gmail.com>
:Message #40 received at 30367-done <at> debbugs.gnu.org (full text, mbox):
From: Alan Mackenzie <acm <at> muc.de> To: Bastian Beischer <bastian.beischer <at> gmail.com> Cc: 30367-done <at> debbugs.gnu.org Subject: Re: bug#30367: 26.0.91; CC-Mode: Major slowdown when isearching big C++ file. Date: Tue, 20 Mar 2018 18:49:47 +0000
Hello, Bastian. On Fri, Feb 09, 2018 at 10:16:53 +0100, Bastian Beischer wrote: > Hello Alan, > Alan Mackenzie <acm <at> muc.de> 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).
Glenn Morris <rgm <at> gnu.org>
to control <at> debbugs.gnu.org
.
(Tue, 20 Mar 2018 22:13:02 GMT) Full text and rfc822 format available.Glenn Morris <rgm <at> gnu.org>
to control <at> debbugs.gnu.org
.
(Tue, 20 Mar 2018 22:14:01 GMT) Full text and rfc822 format available.Glenn Morris <rgm <at> gnu.org>
to control <at> debbugs.gnu.org
.
(Tue, 20 Mar 2018 22:14:02 GMT) Full text and rfc822 format available.Alan Mackenzie <acm <at> muc.de>
to control <at> debbugs.gnu.org
.
(Wed, 21 Mar 2018 20:54:02 GMT) Full text and rfc822 format available.Debbugs Internal Request <help-debbugs <at> gnu.org>
to internal_control <at> debbugs.gnu.org
.
(Thu, 19 Apr 2018 11:24:04 GMT) Full text and rfc822 format available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.