[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Filtering out process filters
From: |
Eli Zaretskii |
Subject: |
Re: Filtering out process filters |
Date: |
Tue, 03 Jun 2025 20:23:53 +0300 |
> Date: Tue, 03 Jun 2025 09:54:29 -0700
> From: Daniel Colascione <dancol@dancol.org>
> CC: arstoffel@gmail.com, emacs-devel@gnu.org
>
> >Not sure about the benchmark, but the profile seems to tell that most
> >of the functions shown there are called via :eval from the mode line.
> >AFAIR, if the mode line needs to be updated, several redisplay
> >optimizations are disabled.
>
>
> Do we want to run : eval modeline functions (and pre-redisplay-functions for
> that matter) when a buffer that isn't visible changes?
We don't, at least not in general. However:
. It is very non-trivial to determine accurately and reliably
whether a mode line needs redrawing, especially if it uses :eval
(which basically can do anything and everything). For a trivial
example, imagine that :eval's result is somehow affected by
buffers that are not shown on display, like sum of sizes of all
buffers or something. In such situations we typically "err on the
safe side".
. The "update modelines" flag is itself a blunt instrument: it
disables various shortcuts that _might_ be affected, even though a
particular reason for setting the flag does not necessarily
contradict some of those shortcuts.
Again, this is pure theory: whether these factors indeed affect the
specific cases in point is anyone's guess. If Augusto describes his
mode-line related customizations, I could walk through the display
code and see if any of the above is in fact relevant. Alternatively,
I could tell where those shortcuts are, and then someone else could
see if they are taken or not given his/her customizations.
Eventually, if some important enough use cases get slowed down due to
redisplay optimizations that aren't smart enough, we could add flags
that allow us to determine whether some changes to global state don't
require thorough redisplay, and add new shortcuts based on such flags.
I'm quite sure that the aspects of redisplay (if indeed it's redisplay
that slows down the scenarios we are discussing) relevant to this
discussion were never seriously considered when redisplay
optimizations were designed and implemented.
- Re: Filtering out process filters, (continued)
- Re: Filtering out process filters, Augusto Stoffel, 2025/06/02
- Re: Filtering out process filters, Daniel Colascione, 2025/06/02
- Re: Filtering out process filters, Augusto Stoffel, 2025/06/03
- Re: Filtering out process filters, Gerd Möllmann, 2025/06/03
- Re: Filtering out process filters, Eli Zaretskii, 2025/06/03
- Re: Filtering out process filters, Eli Zaretskii, 2025/06/03
- Re: Filtering out process filters, Daniel Colascione, 2025/06/03
- Re: Filtering out process filters, Eli Zaretskii, 2025/06/03
- Re: Filtering out process filters, Eli Zaretskii, 2025/06/03
- Re: Filtering out process filters, Daniel Colascione, 2025/06/03
- Re: Filtering out process filters,
Eli Zaretskii <=
- Re: Filtering out process filters, Daniel Colascione, 2025/06/03
- Re: Filtering out process filters, chad, 2025/06/03
- Re: Filtering out process filters, Stéphane Marks, 2025/06/03
- Re: Filtering out process filters, Dmitry Gutov, 2025/06/03
- Re: Filtering out process filters, Eli Zaretskii, 2025/06/04
- Re: Filtering out process filters, Daniel Colascione, 2025/06/04
- Re: Filtering out process filters, Augusto Stoffel, 2025/06/05
- Re: Filtering out process filters, Daniel Colascione, 2025/06/05
- Re: Filtering out process filters, Augusto Stoffel, 2025/06/05
- Re: Filtering out process filters, Augusto Stoffel, 2025/06/06