[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#24048: 25.0.95; syntax-ppss can be slow
From: |
Stefan Monnier |
Subject: |
bug#24048: 25.0.95; syntax-ppss can be slow |
Date: |
Fri, 03 Dec 2021 12:01:41 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
> In certain situations, the caching of syntax-ppss can seem to be
> insufficient for good performance when syntax-ppss is invoked in
> a tight loop.
Yes, that's a known limitation. Most uses of `syntax-ppss` that need to
call it in a tight loop move the call outside of the loop and then use
`parse-partial-sexp` inside the loop (and they're careful to move
forward so `parse-partial-sexp` is only called between the last
position and the current one so we avoid re-parsing the same text).
Currently `syntax-ppss` assumes that parsing <2500 chars is "fast
enough" and hence that it's better not to update the "last ppss data"
when this happens (the advantage is that we save time not-updating the
data and we also save time if the next call is somewhere within those
<2500 chars).
Stefan
- bug#24048: 25.0.95; syntax-ppss can be slow, Lars Ingebrigtsen, 2021/12/01
- bug#24048: 25.0.95; syntax-ppss can be slow,
Stefan Monnier <=
- bug#24048: 25.0.95; syntax-ppss can be slow, Aaron Jensen, 2021/12/03
- bug#24048: 25.0.95; syntax-ppss can be slow, Lars Ingebrigtsen, 2021/12/03
- bug#24048: 25.0.95; syntax-ppss can be slow, Dmitry Gutov, 2021/12/04
- bug#24048: 25.0.95; syntax-ppss can be slow, Aaron Jensen, 2021/12/04
- bug#24048: 25.0.95; syntax-ppss can be slow, Dmitry Gutov, 2021/12/04
- bug#24048: 25.0.95; syntax-ppss can be slow, Aaron Jensen, 2021/12/05