emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scrolling commands and skipping redisplay, was: Re: emacs rendering


From: Dmitry Gutov
Subject: Re: Scrolling commands and skipping redisplay, was: Re: emacs rendering comparisson between emacs23 and emacs26.3
Date: Mon, 20 Apr 2020 06:27:17 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1

On 17.04.2020 20:35, Eli Zaretskii wrote:

In any case, if there is a way to dynamically detect these cases and
disable redisplay skipping for them, I'd like to try that out.

Yes, jit-lock-defer-time is that way.  But you already know that.

No, it speeds up redisplay. It doesn't make *sure* that redisplay is not
skipped.

To do that, need to modify the condition of skipping redisplay.

Adding such a condition would be against Emacs design, which enters
redisplay only when Emacs is idle.  As long as Emacs is not idle,
redisplay will be skipped, that's how Emacs is designed.

As we've determined, certain commands force redisplay to be performed anyway (though partially).

If performing it in full in those cases will take just a little more CPU time, the result might be Emacs that looks more responsive under load, and just as fast.

Even more if there was a way to put the results of "simulated redisplay"
to use in the "real" redisplay later.

That happens automatically, since the 'fontified' property they
produce is left on the buffer text.

That might be sufficient if we assume that font-lock is always the
slowest part of redisplay (for some commands it might not always be
true, but I'm guessing here).

Nothing else can be kept from the move_it_* phase, because the command
that is running might not yet have finished, and so not all of the
changes that affect display are known.

It might be possible to construct some "cache key" that would allow us to check whether the remainder of the command changed something that would affect display. And if it didn't, use the last saved result of move_it_*.

But with that assumption, the extra condition of not skipping redisplay
could be simplified (?) to only checking whether the current screen has
been fontified already (i.e. 'fontified' is non-nil). If it's fontified,
we won't skip redisplay.

I don't think forcing redisplay in the way that you suggest is a good
idea, see above.

Because... it will result in worse performance?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]