[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cc-mode fontification feels random

From: Daniel Colascione
Subject: Re: cc-mode fontification feels random
Date: Fri, 11 Jun 2021 11:02:34 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1

On 6/11/21 10:53 AM, Eli Zaretskii wrote:

Date: Fri, 11 Jun 2021 16:11:19 +0000
Cc: Daniel Colascione <dancol@dancol.org>, rudalics@gmx.at,
   monnier@iro.umontreal.ca, rms@gnu.org, emacs-devel@gnu.org
From: Alan Mackenzie <acm@muc.de>

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)))

together with

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.
I suggest to compare these times with Emacs 23 to see how we

Regression is acceptable in exchange for correctness so long as absolute performance is adequate. We're not using 80486s anymore.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]