Subject: Re: bug#24048: 25.0.95; syntax-ppss can be slow

From: Lars Ingebrigtsen <[email-masked]>
Date: Wed, 01 Dec 2021 20:47:44 +0100

Aaron Jensen <[email-masked]> writes:

> Ultimately, it seems like it may be worth reconsidering this condition:
>
> (and old-pos (< (- pos old-pos)
>     ;; The time to use syntax-begin-function and
>     ;; find PPSS is assumed to be about 2 * distance.
>     (* 2 (/ (cdr (aref syntax-ppss-stats 5))
>     (1+ (car (aref syntax-ppss-stats 5)))))))

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

This bit is now:

	(if (and old-pos (< (- pos old-pos)
			    ;; The time to use syntax-begin-function and
			    ;; find PPSS is assumed to be about 2 * distance.
			    (let ((pair (aref syntax-ppss-stats 5)))
			      (/ (* 2 (cdr pair)) (car pair)))))

I.e., the last clause is gone.  I don't know whether this affects the
issue you were seeing, though.  Is syntax-ppss still mis-caching things
for you?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no