GNU bug report logs -
#43631
28.0.50; CC Mode multiline strings grinds performance to a halt
Previous Next
Reported by: Theodor Thornhill <theo <at> thornhill.no>
Date: Sat, 26 Sep 2020 11:18:01 UTC
Severity: normal
Found in version 28.0.50
Done: Alan Mackenzie <acm <at> muc.de>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Eli Zaretskii <eliz <at> gnu.org> writes:
[...]
>
> Thanks. This seems to indicate that this loop in
> c-pps-to-string-delim is the culprit:
>
> (while (progn
> (parse-partial-sexp (point) end nil nil st-s 'syntax-table)
> (unless (bobp)
> (c-clear-syn-tab (1- (point))))
> (setq st-pos (point))
> (and (< (point) end)
> (not (eq (char-before) ?\")))))
>
> But I'm confused why the "fast" profile starts with
> font-lock-fontify-region, whereas the "slow" profile doesn't have
> font-lock-fontify-region anywhere...
>
Thanks for digging into this. I can add one more thing that I see. When
this variable is set to some char, typing that character and then quote
mark would only insert one quote and fontify to end of buffer as a
string.
Example:
- type @" // (#") for pike-mode
- see whole buffer get fontified
- no extra quote mark is inserted to make a proper pair.
What I would expect:
- type @"
- see @""
- type normally inside quote marks.
I am not sure how this is related, if at all, but found it noticeable
enough to add to this discussion.
Also, if the 'multiline-string' variable is not set, typing @" would
behave as expected, with the pair being closed and nothing other than
string is fontified.
> Hopefully, Alan can take it from here.
Theo
This bug report was last modified 1 year and 282 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.