emacs-devel
[Top][All Lists]
Advanced

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

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


From: Alan Mackenzie
Subject: bug-reference-prog-mode slows down CC Mode's scrolling by ~7%
Date: Wed, 1 Sep 2021 17:33:06 +0000

Hello, Emacs.

In the .dir-locals in our source tree, the entry for C Mode enables
bug-reference-prog-mode.

This minor mode makes direct use of jit-lock-functions, the low level
hook which connects jit-lock with font-lock.

The jit-lock functions have a feature whereby, when fontifying a
500-byte chunk, font-lock-fontify-region notifies jit-lock of the actual
region just fontified, which is typically bigger than the suggested 500
bytes.  This enables jit lock to proceed through the buffer without
fontifying the same text twice.

However, this mechanism is rendered ineffective if a second function is
add-hook'd onto jit-lock-functions.  Maybe this could be fixed, though
it looks difficult.

When applied to C Mode, bug-reference-prog-mode slows down a scroll from
point-min to point-max by around 7%.

Just how useful is bug-reference-prog-mode?  Is it really worth this 7%
slowdown?

-- 
Alan Mackenzie (Nuremberg, Germany).



reply via email to

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