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 19:17:06 +0300

> From: Theodor Thornhill <[email-masked]>
> Cc: [email-masked]
> Date: Sat, 26 Sep 2020 18:03:10 +0200
> 
> > Thanks, but please post the text of Profiler-Report buffer, not the
> > internal structure it produces.
> 
> Ok, third time's the charm:

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...

Hopefully, Alan can take it from here.