Subject: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling)

From: Eli Zaretskii <[email-masked]>
Date: Fri, 19 Aug 2022 15:22:13 +0300

> From: Lars Ingebrigtsen <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Fri, 19 Aug 2022 14:02:01 +0200
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> >> >> (progn
> >> >>   (pop-to-buffer "foo.txt")
> >> >>   (flyspell-mode)
> >> >>   (insert (propertize (make-string 20000 ?x) 'display "foo")
> >> >> 	  "\n\n"))
> >> >
> >> > Still no "Narrow" on the mode line.
> >> 
> >> Did you type a character after eval-ing that?
> >
> > Yes.
> 
> Odd.  I can reproduce this both on Ubuntu and Debian.

Is it true that the call which makes the narrowing comes from
safe_run_hooks_maybe_narrowed in your case?  If so, can you step
through the code after the narrowing and try to figure out why isn't
narrowing undone after the hook function returns?