GNU bug report logs - #76504
31.0.50; Excessive redisplay when display-line-numbers-mode is enabled

Previous Next

Package: emacs;

Reported by: Davide Masserut <dm <at> mssdvd.com>

Date: Sun, 23 Feb 2025 15:29:02 UTC

Severity: minor

Found in version 31.0.50

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

Bug is archived. No further changes may be made.

Full log


Message #11 received at 76504 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: dm <at> mssdvd.com
Cc: 76504 <at> debbugs.gnu.org
Subject: Re: bug#76504: 31.0.50;
 Excessive redisplay when display-line-numbers-mode is enabled
Date: Sun, 23 Feb 2025 18:48:54 +0200
> Cc: 76504 <at> debbugs.gnu.org
> Date: Sun, 23 Feb 2025 18:10:35 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
> 
> Anyway, why is the number of calls to redisplay_internal an issue?
> Emacs calls redisplay_internal when it's idle, so the number of calls
> does not necessarily say anything of importance.

Scratch that: the larger number of samples inside redisplay_internal
is explained by the fact that each of the calls is more expensive when
line numbers are turned on.  Although the large factor you see sounds
too much to me, but I never looked at that metrics.

Anyway, what's important is the time it takes to scroll through a file
with and without line numbers.  So please try the command below and
post the times it reports after scrolling through some large file with
and without the line numbers:

(defun scroll-up-benchmark ()
  (interactive)
  (let ((oldgc gcs-done)
        (oldtime (float-time)))
    (condition-case nil (while t (scroll-up) (redisplay))
      (error (message "GCs: %d Elapsed time: %f seconds"
                      (- gcs-done oldgc) (- (float-time) oldtime))))))




This bug report was last modified 70 days ago.

Previous Next


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