emacs-devel
[Top][All Lists]
Advanced

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

Re: bug-reference-prog-mode slows down CC Mode's scrolling by ~7%


From: Stefan Monnier
Subject: Re: bug-reference-prog-mode slows down CC Mode's scrolling by ~7%
Date: Sat, 11 Sep 2021 14:00:57 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>>     Maybe a good way to see the waste is to measure the time for the
>>     initial font-lock in an outline-mode buffer where the screen is
>>     filled with single-line headers and everything else is hidden:
>>     a whole chunk will be fontified for each line, so with a single
>>     40-line screen you can expect to fontify 40 chunks (unless the
>>     hidden text between lines is smaller than the chunk size, of
>>     course).
>
> That's okay, but the thing is we do fontify invisible text, and 1500
> characters could be easily 40 lines, so the probability of more than
> that to be hidden is not large, except in unusual cases like reading
> Lisp in Outline mode with all the code hidden.

Where, your "unusual" is my default, so I'm quite happy that jit-lock
optimizes this case ;-)


        Stefan




reply via email to

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