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: Alan Mackenzie
Subject: Re: bug-reference-prog-mode slows down CC Mode's scrolling by ~7%
Date: Wed, 1 Sep 2021 17:55:46 +0000

Hello, Eli.

On Wed, Sep 01, 2021 at 20:44:23 +0300, Eli Zaretskii wrote:
> > Date: Wed, 1 Sep 2021 17:33:06 +0000
> > From: Alan Mackenzie <acm@muc.de>

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

> It is marginally useful, but 7% slowdown is too heavy a price, IMO.
> This should be fixed.

I agree.

> (I thought that the code in jit-lock.el already handled this case by
> computing a kind-of "maximum" out of all the return values of
> jit-lock-functions, and treating a nil return value as expected, but
> maybe my reading of the code was incorrect?)

I think it rather uses the "minimum", i.e. the region common to all the
return values from the jit-lock-functions.  If one of these values is nil
(as is the case here), that boils down to exactly the 500-byte chunk.

The comments in jit-lock.el say that this happens, and half-propose a
mechanism for fixing it.  It doesn't look straightforward to fix.

-- 
Alan Mackenzie (Nuremberg, Germany).



reply via email to

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