Subject: Re: bug#56393: Actually fix the long lines display bug

From: Lars Ingebrigtsen <[email-masked]>
Date: Tue, 19 Jul 2022 16:15:58 +0200

Gregory Heytings <[email-masked]> writes:

> Again, because I want to skip the long line detection code/overhead
> for normal editing operation (typing one character at a time).  I do
> not think that a 13 ms overhead for each typed character in a file
> with 150K lines is okay.

Do you need it to run as often as the current code does?  It's a
heuristic -- if it gets it wrong in some pathological situation (i.e.,
if the user replaces all newlines with spaces in a huge buffer with a
function that does just that), that's not a deal breaker.

That is, I don't think you have to run the detection as often as you do
now.  If the previous call said you had no lines longer than 80
characters, you don't have to run it again until the buffer has grown
more than 30K characters, or you have a modiff in the thousands region.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no