Date: Fri, 11 Jun 2021 16:11:19 +0000
Cc: Daniel Colascione <email@example.com>, firstname.lastname@example.org,
email@example.com, firstname.lastname@example.org, email@example.com
From: Alan Mackenzie <firstname.lastname@example.org>
I have measured CC Mode's scrolling performance using:
(defmacro time-it (&rest forms)
"Time the running of a sequence of forms using `float-time'.
Call like this: \"M-: (time-it (foo ...) (bar ...) ...)\"."
`(let ((start (float-time)))
(- (float-time) start)))
M-: (time-it (scroll-up-window) (sit-for 0))
on regions of text which are not yet fontified. My window has 65 lines
of buffer text. Starting at the middle of xdisp.c, I see the following
timings for the first few scrolls:
0.026s, 0.025s, 0.026s, 0.078s, 0.026s, 0.027s.
That is, with the exception of the fourth timing, the scroll operation
takes a little over 1/40 second.
This is in an Emacs-28 compiled with default optimisation, on a 4
year-old first generation Ryzen machine.
For me personally, this scrolling speed, in conjunction with
fast-but-imprecise-scrolling, is acceptable. I also accept there are
people with slower machines.