Subject: bug#20404: 25.0.50; Sometimes no fontification with jit-lock-defer-time

From: Alan Mackenzie <[email-masked]>
Date: 22 Apr 2015 16:31:10 -0000

In article <[email-masked]> you wrote:

[ .... ]

> Fun anecdote: I really have a pretty fast machine but still scrolling,
> e.g., buffer.c, by pressing and holding `C-v' causes visible scrolling
> for 1-2 seconds, and then the display freezes.  Emacs burns one core,
> and the next visible change I can observe is that the end of the buffer
> is displayed after the ~6 seconds where emacs seems frozen.  That lead
> me to looking for solutions, and deferred JIT lock and stealth lock
> seemed like a good idea (and they are!).

There's a solution (or, depending on your point of view, a workaround)
for this.  You're using Emacs-25, so set fast-but-imprecise-scrolling to
t, or customize it (it's in customisation group "scrolling").  What it
does is only to fontify screen-worths it's about to display, rather than
fontifying the entire buffer portion that is scrolled over.  The
disadvantage is that if you're using faces with different heights, the
exact place the scrolling ends up at might not be quite correct, but if
you're holding down C-v anyway, this might not matter too much.

[ .... ]

> In GNU Emacs 25.0.50.12 (x86_64-unknown-linux-gnu, GTK+ Version 3.16.2)
> of 2015-04-21 on thinkpad-t440p

-- 
Alan Mackenzie (Nuremberg, Germany).