emacs-diffs
[Top][All Lists]
Advanced

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

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


From: Eli Zaretskii
Subject: emacs-27 d7a4cea: ; Add a new item to TODO
Date: Thu, 17 Dec 2020 09:22:36 -0500 (EST)

branch: emacs-27
commit d7a4ceaa1e5d347e84d99c6b854b2144b32366b3
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    ; Add a new item to TODO
    
    * etc/TODO (redisplay): Add an item for making redisplay cycle
    more scalable when there are many frames.
---
 etc/TODO | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/etc/TODO b/etc/TODO
index 152a299..5c6a210 100644
--- a/etc/TODO
+++ b/etc/TODO
@@ -536,6 +536,42 @@ This should go with point, so that motion commands can 
also move
 through tall images.  This value would be to point as window-vscroll
 is to window-start.
 
+** 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.
+
+Currently, two variables are used to make the decision what to
+redisplay: update_mode_lines and windows_or_buffers_changed.  These
+are set by various functions called from Lisp, and if redisplay finds
+one of them to be non-zero, it considers all the windows on all the
+frames for redisplay.
+
+The idea is to make the decision which parts need to be redrawn more
+fine-grained.  Instead of simple boolean variables, we could have a
+bitmapped variable which records the kinds of changes done by Lisp
+since the previous redisplay cycle.  Then the decision what exactly
+needs to be redrawn could be made based on the bits that are set.
+
+For example, one reason to consider all frames is that some scrolling
+command sets the update_mode_lines variable non-zero.  This is done
+because the frame title, which doesn't belong to any window, needs to
+be reconsidered when the selected window is scrolled.  But considering
+the frame title doesn't have to redisplay all the other windows on the
+frame, doesn't need to recompute the menu items and the tool-bar
+buttons, and doesn't need to consider frames other than the selected
+one.  Being selective about what parts of the Emacs display need to be
+reconsidered and redrawn given the changes since the last redisplay
+will go along way towards making redisplay more scalable.
+
+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.
+
 ** Address internationalization of symbols names
 Essentially as if they were documentation, e.g. in command names and
 Custom.



reply via email to

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