From: Theodor Thornhill via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 43631@debbugs.gnu.org
Subject: bug#43631: 28.0.50; CC Mode multiline strings grinds performance to a halt
Date: Sat, 26 Sep 2020 14:40:36 +0200 [thread overview]
Message-ID: <87eemo4sor.fsf@thornhill.no> (raw)
In-Reply-To: <83pn68rcio.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 1014 bytes --]
Eli Zaretskii <eliz@gnu.org> writes:
> All the profiles posted there end prematurely, thus making it
> impossible to make independent conclusions regarding the possible
> culprits. Would it be possible to post here a full profile,
> completely expanded, obtained after loading all the relevant *.el
> files as *.el (NOT *.elc!), so that the profile is detailed enough to
> show the relevant parts? It would make the discussion much more
> focused.
>
> Bonus points for posting another profile, where the feature you think
> is the main culprit is disabled.
>
> TIA
Attached is two reports, one which is super slow, and one that is fast.
Recipe:
- git clone https://github.com/unhammer/csharp-mode/
- git checkout 164-repro
- eval csharp-mode.el
- open superslow.cs and write some text
- rinse, repeat, but with
(c-lang-defconst c-multiline-string-start-char
csharp ?@)
commented out.
One is unbearably slow, the other is super fast.
Hope this helps a little!
All the best,
Theodor Thornhill
[-- Attachment #2: not-slow-without-multiline.txt --]
[-- Type: text/plain, Size: 1648 bytes --]
[profiler-profile "24.3" cpu #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data ([redisplay sit-for execute-extended-command funcall-interactively call-interactively command-execute nil nil nil nil nil nil nil nil nil nil] 1 [progn unwind-protect let and if save-restriction if progn if let c-beginning-of-macro and let* progn unwind-protect let*] 1 [nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil] 17 [font-lock-fontify-syntactically-region font-lock-default-fontify-region funcall progn unwind-protect let* progn unwind-protect let* let save-restriction c-font-lock-fontify-region font-lock-fontify-region "#<compiled 0x58b8bcdf3863eb5>" run-hook-wrapped jit-lock--run-functions] 1 [progn cond let* save-excursion progn unwind-protect let c-invalidate-sws-region-before save-excursion progn unwind-protect progn unwind-protect let save-restriction if] 1 [self-insert-command funcall-interactively call-interactively command-execute nil nil nil nil nil nil nil nil nil nil nil nil] 1 [save-restriction progn if c-extend-after-change-region font-lock-extend-jit-lock-region-after-change run-hook-with-args jit-lock-after-change self-insert-command funcall-interactively call-interactively command-execute nil nil nil nil nil] 1 [read-from-minibuffer completing-read-default completing-read read-extended-command byte-code call-interactively command-execute nil nil nil nil nil nil nil nil nil] 2 [completing-read-default completing-read read-extended-command byte-code call-interactively command-execute nil nil nil nil nil nil nil nil nil nil] 2 [Automatic\ GC] 11)) (24431 13788 861111 419000) nil]
[-- Attachment #3: report-slow-with-multiline.txt --]
[-- Type: text/plain, Size: 6146 bytes --]
[profiler-profile "24.3" cpu #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data ([sit-for execute-extended-command funcall-interactively call-interactively command-execute nil nil nil nil nil nil nil nil nil nil nil] 1 [progn while let* c-pps-to-string-delim progn and while progn if cond let* progn unwind-protect let* c-before-change-check-unbalanced-strings funcall] 1212 [setq cond progn and while condition-case let c-syntactic-re-search-forward and while progn and while progn if cond] 1 [c-pps-to-string-delim progn and while progn if cond let* progn unwind-protect let* c-before-change-check-unbalanced-strings funcall "#<lambda 0x8f29c4b23d484>" mapc if] 2 [unwind-protect let save-excursion cond progn and while condition-case let c-syntactic-re-search-forward and while progn and while progn] 1 [remove-text-properties progn if while let c-clear-char-property-with-value-on-char-function progn if let* progn unwind-protect let* c-parse-quotes-before-change funcall "#<lambda 0x8f29c4b23d484>" mapc] 1 [progn while let* c-pps-to-string-delim cond let* progn unwind-protect let* c-before-change-check-unbalanced-strings funcall "#<lambda 0x8f29c4b23d484>" mapc if save-excursion progn] 3 [progn and while progn and while progn if cond let* progn unwind-protect let* c-before-change-check-unbalanced-strings funcall "#<lambda 0x8f29c4b23d484>"] 2 [setq progn and while condition-case let c-syntactic-re-search-forward and while progn and while progn if cond let*] 1 [progn and while condition-case let c-syntactic-re-search-forward and while progn and while progn if cond let* progn] 1 [setq while progn if let save-restriction save-excursion c-parse-ps-state-below setq progn if let* progn unwind-protect let save-restriction] 2 [nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil] 2 [set-match-data unwind-protect let progn if save-restriction if progn if let c-beginning-of-macro progn unwind-protect let save-excursion cond] 1 [let if c-invalidate-state-cache-1 if c-invalidate-state-cache cond while save-restriction let* progn unwind-protect let* c-parse-quotes-after-change funcall "#<lambda 0xb9ab7fa2473f23>" mapc] 2 [if if while let* progn unwind-protect let* if c-after-change-mark-abnormal-strings funcall "#<lambda 0xb9ab7fa2473f23>" mapc save-excursion progn unwind-protect progn] 5 [goto-char let* c-pps-to-string-delim progn and while progn if cond let* progn unwind-protect let* c-before-change-check-unbalanced-strings funcall "#<lambda 0x8f29c4b23d484>"] 1 [if progn and while condition-case let c-syntactic-re-search-forward and while progn and while progn if cond let*] 4 [and if progn while progn unwind-protect let progn if save-restriction if progn if let c-beginning-of-macro progn] 2 [if progn if let c-beginning-of-macro progn unwind-protect let save-excursion cond progn and while condition-case let c-syntactic-re-search-forward] 2 [save-restriction if progn if let c-beginning-of-macro progn unwind-protect let save-excursion cond progn and while condition-case let] 2 [let and if save-restriction if progn if let c-beginning-of-macro progn unwind-protect let save-excursion cond progn and] 2 [cond progn and while condition-case let c-syntactic-re-search-forward and while progn and while progn if cond let*] 1 [and if let c-backward-sws c-determine-limit-get-base let* save-excursion c-determine-limit setq if let c-fl-decl-start or setq if c-change-expand-fl-region] 1 [let* c-pps-to-string-delim progn and while progn if cond let* progn unwind-protect let* c-before-change-check-unbalanced-strings funcall "#<lambda 0x8f29c4b23d484>" mapc] 1 [assq cdr looking-at if if while let* progn unwind-protect let* if c-after-change-mark-abnormal-strings funcall "#<lambda 0xb9ab7fa2473f23>" mapc save-excursion] 1 [let c-syntactic-re-search-forward and while progn and while progn if cond let* progn unwind-protect let* c-before-change-check-unbalanced-strings funcall] 1 [setq c-truncate-lit-pos-cache c-clear-syn-tab progn and while progn and while progn if cond let* progn unwind-protect let*] 1 [c-clear-syn-tab if progn while let* c-pps-to-string-delim progn and while progn if cond let* progn unwind-protect let*] 2 [char-before eq while progn while progn unwind-protect let progn if save-restriction if progn if let c-beginning-of-macro] 1 [c-syntactic-re-search-forward and while progn and while progn if cond let* progn unwind-protect let* c-before-change-check-unbalanced-strings funcall "#<lambda 0x8f29c4b23d484>"] 2 [setq c-truncate-lit-pos-cache c-invalidate-state-cache-1 if c-invalidate-state-cache cond while save-restriction let* progn unwind-protect let* c-parse-quotes-after-change funcall "#<lambda 0xb9ab7fa2473f23>" mapc] 1 [and while save-restriction let* progn unwind-protect let* c-parse-quotes-after-change funcall "#<lambda 0xb9ab7fa2473f23>" mapc save-excursion progn unwind-protect progn unwind-protect] 1 [not save-excursion cond while save-restriction let* progn unwind-protect let* c-parse-quotes-after-change funcall "#<lambda 0xb9ab7fa2473f23>" mapc save-excursion progn unwind-protect] 1 [setq progn while progn and while let* progn unwind-protect let* if c-after-change-mark-abnormal-strings funcall "#<lambda 0xb9ab7fa2473f23>" mapc save-excursion] 1 [c-truncate-lit-pos-cache c-invalidate-state-cache-1 if c-invalidate-state-cache cond while save-restriction let* progn unwind-protect let* c-parse-quotes-after-change funcall "#<lambda 0xb9ab7fa2473f23>" mapc save-excursion] 1 [save-excursion cond progn and while condition-case let c-syntactic-re-search-forward and while progn and while progn if cond] 1 [unwind-protect let and if save-restriction if progn if let c-beginning-of-macro progn unwind-protect let save-excursion cond progn] 1 [while let* progn unwind-protect let* if c-after-change-mark-abnormal-strings funcall "#<lambda 0xb9ab7fa2473f23>" mapc save-excursion progn unwind-protect progn unwind-protect let] 1 [completing-read-default completing-read read-extended-command byte-code call-interactively command-execute nil nil nil nil nil nil nil nil nil nil] 4 [Automatic\ GC] 73)) (24431 13704 63591 401000) nil]
next prev parent reply other threads:[~2020-09-26 12:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-26 11:17 bug#43631: 28.0.50; CC Mode multiline strings grinds performance to a halt Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-09-26 11:41 ` Eli Zaretskii
2020-09-26 12:40 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2020-09-26 13:43 ` Eli Zaretskii
2020-09-26 16:03 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-09-26 16:17 ` Eli Zaretskii
2020-09-26 19:43 ` Dmitry Gutov
2020-09-27 9:54 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-09-27 11:34 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-09-28 19:33 ` Alan Mackenzie
2020-09-28 19:41 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-13 15:26 ` Alan Mackenzie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87eemo4sor.fsf@thornhill.no \
--to=bug-gnu-emacs@gnu.org \
--cc=43631@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=theo@thornhill.no \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.