emacs-devel
[Top][All Lists]
Advanced

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

Re: emacs-27 d7a4cea: ; Add a new item to TODO


From: Stefan Monnier
Subject: Re: emacs-27 d7a4cea: ; Add a new item to TODO
Date: Thu, 17 Dec 2020 11:22:49 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> +** Make redisplay smarter about which parts to redraw
> +Currently, redisplay has only 2 levels of redrawing: either it
> +redisplays only the selected window on the selected frame, or it
> +redisplays all the windows on all the frames.  This doesn't scale well
> +when the number of visible frames is large.

I don't think that's true: the change I installed some years back (along
with the `pre-redisplay-function` and its use for the region highlight)
does specifically try and select a particular subset of frames/windows.
That's what the `wset_redisplay`, `fset_redisplay` and `bset_redisplay`
are about.

And indeed `pre-redisplay-function` is passed the specific set of
windows that have been found to need a redisplay and this set can be
much more varied than what you describe above.

> +Currently, two variables are used to make the decision what to
> +redisplay: update_mode_lines and windows_or_buffers_changed.

There's also a `redisplay` "bit" on frames, windows, and buffer
text objects.

> +One way of making this change is to go through all the places that set
> +update_mode_lines and windows_or_buffers_changed, figure out which
> +portions of the Emacs display could be affected by each change, and
> +then implement the bitmap which will record each of these affected
> +display portions.  The logic in redisplay_internal will then need to
> +be restructured so as to support this fine-grained redisplay.

Indeed, that's very useful and I did use exactly this approach back then
(and as the rest of your text describes, there are more opportunities).
In order to make this easier I changed the code such that every
assignment to those two variable sets it to a different value, and then
in at every redisplay cycle are record which value is found by
increasing the counter in the corresponding slot of
`redisplay--all-windows-cause` and `redisplay--mode-lines-cause`.


        Stefan




reply via email to

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