emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] master 5c9304e: Disable some display optimizations whe


From: Eli Zaretskii
Subject: Re: [Emacs-diffs] master 5c9304e: Disable some display optimizations when frames need redisplay
Date: Sat, 03 Oct 2015 10:21:18 +0300

> From: Stefan Monnier <address@hidden>
> Cc: address@hidden
> Date: Fri, 02 Oct 2015 21:05:13 -0400
> 
> > So that special value of windows_or_buffers_changed just adds
> > management (you need to reset it, and it can acquire higher values
> > depending on what redisplay_internal discovers), without adding any
> > value.
> 
> I'm not sure how much there is to gain from removing it, since it's also
> used for wset_redisplay and bset_redisplay.  But it sounds like you have
> a plan.
> 
> > The loop over all frames checking whether any have the 'redisplay'
> > flag set is fast, so there's no need for a global flag to convey that.
> 
> Indeed, such a loop is cheap.  But as long as windows_or_buffers_changed
> is used for the wset_redisplay and bset_redisplay, I don't see much
> benefit in removing it from fset_redisplay.
> 
> But of course, looping over all windows is also fairly cheap, so I guess
> you're planning to remove it also from wset_redisplay and bset_redisplay?

Maybe, I don't know yet.  I intended to, but now I think I need to
digest the new knowledge first.

> >> 100% agreement, and that's why I introduced those `redisplay' bits and
> >> the corresponding REDISPLAY_SOME value for windows_or_buffers_changed.
> >> 
> >> And AFAIK it already has the effect that when we call fset_redisplay only
> >> those frames get redisplayed.
> 
> > Maybe so, but the effect of this on frames is completely undocumented,
> 
> I tried to document it in those var's comment:
> 
>    /* Nonzero if we should redraw the mode lines on the next redisplay.
>       If it has value REDISPLAY_SOME, then only redisplay the mode lines where
>       the `redisplay' bit has been set.  Otherwise, redisplay all mode lines
>       (the number used is then only used to track down the cause for this
>       full-redisplay).  */
> 
>    int update_mode_lines;
> 
>    /* Nonzero if window sizes or contents other than selected-window have
>       changed since last redisplay that finished.
>       If it has value REDISPLAY_SOME, then only redisplay the windows where
>       the `redisplay' bit has been set.  Otherwise, redisplay all windows
>       (the number used is then only used to track down the cause for this
>       full-redisplay).  */
> 
>    int windows_or_buffers_changed;
> 
> I see it's not very specific about frame/window/buffer's `redisplay'
> flag, tho.

Indeed.

Tell you what: if you add commentary that describes the logic of using
these two variables, the window's and frame's 'redisplay' flags, and
how all those are used to decide which parts need to be redisplayed,
and if that commentary makes it clear that the code I added is
redundant, I will remove the code I added, and see if some alternative
design would be better.  Deal?



reply via email to

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