[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#21453: When font size is temporarily increased Emacs is slow
From: |
Mark Karpov |
Subject: |
bug#21453: When font size is temporarily increased Emacs is slow |
Date: |
Sun, 27 Sep 2015 17:02:12 +0600 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
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.
- bug#21453: 25.0.50; When font size is temporarily increased Emacs is slow, (continued)
- bug#21453: 25.0.50; When font size is temporarily increased Emacs is slow, Mark Karpov, 2015/09/10
- bug#21453: 25.0.50; When font size is temporarily increased Emacs is slow, Mark Karpov, 2015/09/11
- bug#21453: 25.0.50; When font size is temporarily increased Emacs is slow, Eli Zaretskii, 2015/09/11
- bug#21453: 25.0.50; When font size is temporarily increased Emacs is slow, Mark Karpov, 2015/09/11
- bug#21453: 25.0.50; When font size is temporarily increased Emacs is slow, Eli Zaretskii, 2015/09/11
- bug#21453: 25.0.50; When font size is temporarily increased Emacs is slow, Mark Karpov, 2015/09/11
- bug#21453: 25.0.50; When font size is temporarily increased Emacs is slow, Eli Zaretskii, 2015/09/11
- bug#21453: 25.0.50; When font size is temporarily increased Emacs is slow, Eli Zaretskii, 2015/09/26
- bug#21453: 25.0.50; When font size is temporarily increased Emacs is slow, Mark Karpov, 2015/09/26
- bug#21453: 25.0.50; When font size is temporarily increased Emacs is slow, Eli Zaretskii, 2015/09/26
- bug#21453: When font size is temporarily increased Emacs is slow,
Mark Karpov <=
- bug#21453: When font size is temporarily increased Emacs is slow, Eli Zaretskii, 2015/09/28
- bug#21453: 25.0.50; When font size is temporarily increased Emacs is slow, Mark Karpov, 2015/09/27
- bug#21453: When font size is temporarily increased Emacs is slow, Mark Karpov, 2015/09/27