Subject: Re: bug#43631: 28.0.50; CC Mode multiline strings grinds performance to a halt

From: Eli Zaretskii <[email-masked]>
Date: Sat, 26 Sep 2020 14:41:19 +0300

> Date: Sat, 26 Sep 2020 13:17:29 +0200
> From: Theodor Thornhill via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <[email-masked]>
> 
> While creating a new mode derived from CC Mode, we noticed performance
> is affected heavily when setting a character for
> 'c-multiline-string-start-char'. There is a discussion around this that
> can be found at https://github.com/josteink/csharp-mode/issues/164,
> and we were given an easily reproducible repo for this. It is verified
> to slow typing down both in 'csharp-mode', 'pike-mode' and in this test
> case:
> https://github.com/unhammer/csharp-mode/tree/164-repro
> 
> I think (unconvincingly) that some of the problematic code is situated
> around line 2047 in 'cc-mode.el', but this is only a guess taken from
> some light profiling.

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