GNU bug report logs -
#24048
25.0.95; syntax-ppss can be slow
Previous Next
Reported by: Aaron Jensen <aaronjensen <at> gmail.com>
Date: Thu, 21 Jul 2016 14:31:02 UTC
Severity: normal
Tags: moreinfo
Found in version 25.0.95
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On Fri, Dec 3, 2021 at 2:04 PM Stefan Monnier <monnier <at> iro.umontreal.ca> wrote:
>
> > 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).
Copy that, thanks for the explanation. I'm not presently affected by
this (no smartparens and no elixir) so I'd be happy to close this
given that it's working as expected and there are clear ways to avoid
it in many cases.
Thanks,
Aaron
This bug report was last modified 3 years and 221 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.