Subject: bug#56682: Fix the long lines font locking related slowdowns

From: Eli Zaretskii <[email-masked]>
Date: Mon, 01 Aug 2022 20:08:00 +0300

> Date: Mon, 01 Aug 2022 16:49:55 +0000
> From: Gregory Heytings <[email-masked]>
> cc: [email-masked], [email-masked], [email-masked], 
>     [email-masked]
> 
> > Can you explain which, if any, problems you saw or had in mind, and what 
> > and how did you want to fix them with this particular hunk?  I'd then 
> > suggest a better change (or agree with your change, in case I missed 
> > something).
> 
> You're correct, now that I think again about this, it was just wrong. 
> Fixed.

OK, thanks.  But anyway: the possibly slow part there is not
find_newline_no_quit, it's the loop that calls
bidi_move_to_visually_next afterwards, in case the newline is very far
back.  So if we ever want to make that part faster, we should force
that loop to start from narrowed_begv, not from where we find the
previous newline.