emacs-devel
[Top][All Lists]
Advanced

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

Debouncing slow mode line constructs (was: Emacs design and architecture


From: Ihor Radchenko
Subject: Debouncing slow mode line constructs (was: Emacs design and architecture. How about copy-on-write?)
Date: Thu, 21 Sep 2023 11:36:34 +0000

Dmitry Gutov <dmitry@gutov.dev> writes:

> On 21/09/2023 14:17, Ihor Radchenko wrote:
>>> And even the "slow" mode-line packages still manage to maintain at least
>>> 5fps, I believe.
>> Nope. 0.2 sec is the delay that is barely noticeable. When "slow"
>> mode-line packages affect users it is usually much worse than 5fps.
>> (Though sometimes it is due to redisplay being fired frequently, not the
>> individual refresh times being too large).
>
> My own experience is finding certain mode-lines that look okay on the 
> first glance, but then after measuring, finding them to be the chief 
> contributor to the lower refresh rate. Those might refresh well above 
> 10fps, but spending 100ms (or even 50ms) on a mode-line is ridiculous.
>
> Delays which are noticeable by humans start at around 100ms for random 
> ones. But if the goal is 60fps, redisplay should finish at below 2ms.

Which just make the point stronger - even slight performance
inefficiencies for mode line constructs are affecting user experience a
lot.

It might be a good idea to address this problem even within the current
single-threaded redisplay.

What about automatically debouncing slow :eval constructs in the mode
line? If we make sure that :eval constructs running longer than a
threshold do not run too frequently, it can certainly improve user
experience.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

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