Subject: bug#44983: Truncate long lines of grep output

From: Lars Ingebrigtsen <[email-masked]>
Date: Sat, 30 Apr 2022 11:36:37 +0200

I've instrumented some functions to try to see what's going on.

I've set things up so that grep lines that are longer than 200 chars are
invisible starting at the 200th character.  While the grep is running,
`jit-lock-fontify-now' is called repeatedly and takes longer time each
time, but with the same region:

Fontifying *grep* 392-1892
Fontifying *grep* 392-1892
Fontifying *grep* 392-1892

392 is the start of the line, and 1892 is in the invisible portion of
the line.  That's 1500 characters, so it should be fast -- but perhaps
it's extending it to the end of the line anyway?

But before I start trying to debug that, I'm wondering: Why is
`jit-lock-fontify-now' called at all here?  There have been no display
changes -- the text was inserted, but as invisible text, so no font
locking should be necessary.

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