GNU bug report logs - #77361
[PATCH] New user option to hide minor mode lighters

Previous Next

Package: emacs;

Reported by: Pengji Zhang <me <at> pengjiz.com>

Date: Sat, 29 Mar 2025 11:09:02 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Daniel Mendler <mail <at> daniel-mendler.de>
To: Pengji Zhang <me <at> pengjiz.com>
Cc: 77361 <at> debbugs.gnu.org
Subject: bug#77361: [PATCH] New user option to hide minor mode lighters
Date: Sun, 06 Apr 2025 10:40:32 +0200
Pengji Zhang <me <at> pengjiz.com> writes:

> Daniel Mendler <mail <at> daniel-mendler.de> writes:
>
>> Hello Pengji!
>
> Hi Daniel!
>
>> This is a good idea. I've used both minions and diminish and it is nice
>> to have this functionality ootb. I have some concerns however regarding
>> the frequent mode line recomputation during redisplay. Do you see a
>> possibility to cache the computed minor mode menu and collapsed lighter?
>> In any case, the computation should be as efficient as possible. For
>> profiling I suggest to enable your new user option and then scroll
>> repeatedly in order to force redisplays and mode line recomputations. If
>> certain mode line functions appear prominently in the profile they are
>> candidates for optimization, in order to reduce redisplay latency.
>
> Thanks! I did not consider the performance issue much. How about
> deferring the computation of the minor mode menu, the most costly part?

Deferring the menu computation sounds like a good idea, in particular
since the menu is only accessed rarely. The repeated recomputation of
the mode line elements itself should be fine.

> Still we need to split 'minor-mode-alist' and do some other work, but my
> profiling showed that there was little impact to the performance.

Thanks for checking.

Daniel




This bug report was last modified 14 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.