all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Alan Mackenzie <acm@muc.de>
Cc: emacs-devel@gnu.org
Subject: Re: bug#20352: Factor 2 slow down of font-locking in c-mode
Date: Sun, 03 May 2015 22:13:48 -0400	[thread overview]
Message-ID: <jwvd22h3xh9.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <20150503213303.GA4997@acm.fritz.box> (Alan Mackenzie's message of "Sun, 3 May 2015 21:33:03 +0000")

> Indeed.  Some while ago, you were musing on putting syntax-ppss, or
> equivalent, into syntax.c, thus rendering
> open-paren-in-column-0-is-defun-start unnecessary and obsolete.  This
> would speed up or improve the accuracy of, in particular, back_comment
> and the stacks of things which depend upon it.

> Is this enhancement still intended?

Not in the short term, no.  I've toyed with it, but there's a problem:
syntax-ppss's caching relies on the syntax-table being constant.
This usually works fine because the callers "know" to call syntax-ppss
outside of with-syntax-table (I guess in reality they don't really know,
but they happen to do that because they call syntax-ppss fairly early
on), but it's not uncommon for Elisp code (definitely including CC-mode)
to use with-syntax-table around calls to forward-sexp/comment, so
calling syntax-ppss implicitly from within those functions exposes this
underlying syntax-ppss limitation.

IOW, it can't be done until we figure out how to make syntax-ppss handle
syntax-table changes.


        Stefan



  reply	other threads:[~2015-05-04  2:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-17  1:41 bug#20352: Factor 2 slow down of font-locking in c-mode Stefan Monnier
     [not found] ` <mailman.852.1429234928.904.bug-gnu-emacs@gnu.org>
2015-04-17 19:10   ` Alan Mackenzie
     [not found]     ` <jwv618uukei.fsf-monnier+emacsbugs@gnu.org>
     [not found]       ` <20150418094552.GA4182@acm.fritz.box>
2015-04-18 17:32         ` Alan Mackenzie
     [not found]         ` <jwvoamlv8qy.fsf-monnier+emacsbugs@gnu.org>
2015-05-03 21:33           ` Alan Mackenzie
2015-05-04  2:13             ` Stefan Monnier [this message]
2015-05-04 10:33               ` Alan Mackenzie
2016-05-16 17:28 ` Paul Eggert
2016-05-17  9:05   ` Alan Mackenzie

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=jwvd22h3xh9.fsf-monnier+emacsbugs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=acm@muc.de \
    --cc=emacs-devel@gnu.org \
    /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.