From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Emacs Devel <emacs-devel@gnu.org>
Subject: Re: Explain syntax-ppss-stats please
Date: Sun, 06 Apr 2008 03:25:17 +0200 [thread overview]
Message-ID: <47F8267D.2060104@gmail.com> (raw)
In-Reply-To: <jwvtzigw32w.fsf-monnier+emacs@gnu.org>
Stefan Monnier wrote:
>> I do not understand the use of syntax-ppss-stats at all. Where is it used?
>> (I can only see that the 5:th element is read.) How does it work?
>
> Only the 5th element is really used. The rest was added there during
> development to tune the algorithm. It could be removed.
Thanks. I still believe too much in magic. I thought something strange
was going on somewhere behind the scenes.
Maybe this could be told in the code and the lines changing the other
elements commented out?
> As for the 5th element it's used to keep track of the average size of
> a "defun", so as to know whether to use the closest cache location, or
> to try and find a closer location with syntax-begin-function: if the
> closest cache location is 100KB earlier and syntax-begin-function
> usually finds a safe point within 10KB, we're better off calling
> syntax-begin-function (when tho it'll typically take a while itself)
> than running parse-partial-sexp on the 100KB. But OTOH if
> syntax-begin-function usually needs to look back 200KB to find a safe
> spot, then just the call to syntax-begin-function might take us longer
> than just running parse-partial-sexp on the 100KB.
Thanks, this was helpful.
prev parent reply other threads:[~2008-04-06 1:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-05 15:51 Explain syntax-ppss-stats please Lennart Borgman (gmail)
2008-04-05 18:53 ` Stefan Monnier
2008-04-06 1:25 ` Lennart Borgman (gmail) [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47F8267D.2060104@gmail.com \
--to=lennart.borgman@gmail.com \
--cc=emacs-devel@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.