GNU bug report logs -
#21453
25.0.50; When font size is temporarily increased Emacs is slow
Previous Next
Reported by: Mark Karpov <markkarpov <at> openmailbox.org>
Date: Thu, 10 Sep 2015 10:03:02 UTC
Severity: normal
Found in version 25.0.50
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #44 received at 21453 <at> debbugs.gnu.org (full text, mbox):
Here I describe my experiment and its outcome.
Setting
=======
To measure how long it takes to scroll a long buffer from beginning to
end with ‘next-line’ command the following code was evaluated:
(defmacro with-timer (title &rest forms)
"Run the given FORMS, counting the elapsed time.
A message including the given TITLE and the corresponding elapsed
time is displayed."
(declare (indent 1))
(let ((nowvar (make-symbol "now"))
(body `(progn ,@forms)))
`(let ((,nowvar (current-time)))
(message "%s..." ,title)
(prog1 ,body
(let ((elapsed
(float-time (time-subtract (current-time) ,nowvar))))
(message "%s... done (%.3fs)" ,title elapsed))))))
(defun next-line-racer ()
"Scroll till end of buffer with `next-line' and measure how long it takes.
To make it realistic `next-line' is called interactively."
(interactive)
(with-timer
(while (not (eobp))
(call-interactively #'next-line))))
The file used:
https://github.com/Fuco1/smartparens/blob/master/smartparens.el
which is 7992 lines long.
The Experiment
==============
The file is opened and cursor is at the beginning of the file. Font size
is either altered with ‘C-x C-=’ (increased, denoted in results as +1)
or ‘C-x C--’ (decreased, denoted in results as -1) or not altered at
all. No adjustments to compensate number of visible lines were performed
in this experiment because I think difference wouldn't be noticeable.
Then ‘M-x next-line-racer’ is called. Emacs seemingly freezes for some
time until it shows the point (cursor) at the end of the buffer and
message in mini-buffer displaying time it took to accomplish the
scrolling.
No demanding processes were run in the background during the experiment.
The Results
===========
Here I post measured times:
Font Size Time in Seconds
normal 301.423
+1 1055.157
-1 487.935
Hope it helps.
This bug report was last modified 5 years and 192 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.