[Top][All Lists]

[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: Thu, 02 Sep 2021 14:46:51 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>> > 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.
>> I think we can "easily" handle this specific case if the
>> `bug-reference-prog-mode` function is added to the end of the hook
>> rather than to its beginning and use a patch along the lines of the
>> one below.
> Yes.  How about an optional parameter to jit-lock-register meaning "put
> this function at the beginning of jit-lock-functions", with the default
> meaning put the function at the end?

Sure.  Basically, the idea is that the function which is most likely to
grow the bounds (or to grow them most) should come first.

> I haven't tried it, but I don't think the patch below is quite enough.

I'd be surprised if it is, indeed, I just thought it was a better
description of the intention than whatever I could come up in words.


reply via email to

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