unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Aaron Jensen <aaronjensen@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 24048@debbugs.gnu.org
Subject: bug#24048: 25.0.95; syntax-ppss can be slow
Date: Fri, 3 Dec 2021 20:31:50 -0500	[thread overview]
Message-ID: <CAHyO48xEYEWiBhF1pKyu4MOW0ofaYx1qe+u=ZTZ4B8La4Sr+5w@mail.gmail.com> (raw)
In-Reply-To: <jwv1r2tbpur.fsf-monnier+emacs@gnu.org>

On Fri, Dec 3, 2021 at 2:04 PM Stefan Monnier <monnier@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





  reply	other threads:[~2021-12-04  1:31 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-21 14:29 bug#24048: 25.0.95; syntax-ppss can be slow Aaron Jensen
2016-07-25  1:16 ` Dmitry Gutov
2016-07-25  7:12   ` Aaron Jensen
2016-07-25 12:42     ` Dmitry Gutov
2016-07-25 15:08       ` Aaron Jensen
2018-03-30 13:09         ` Aaron Jensen
2021-12-01 19:47           ` Lars Ingebrigtsen
2021-12-03  2:38             ` Aaron Jensen
2021-12-03 16:26               ` Lars Ingebrigtsen
2021-12-03 17:01 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-04  1:31   ` Aaron Jensen [this message]
2021-12-04  2:41     ` Lars Ingebrigtsen
2021-12-04 14:40     ` Dmitry Gutov
2021-12-04 16:27       ` Aaron Jensen
2021-12-05  0:13         ` Dmitry Gutov
2021-12-05  5:06           ` Aaron Jensen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHyO48xEYEWiBhF1pKyu4MOW0ofaYx1qe+u=ZTZ4B8La4Sr+5w@mail.gmail.com' \
    --to=aaronjensen@gmail.com \
    --cc=24048@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).