emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] comment-cache 223d16f 2/3: Apply `comment-depth' text


From: Dmitry Gutov
Subject: Re: [Emacs-diffs] comment-cache 223d16f 2/3: Apply `comment-depth' text properties when calling `back_comment'.
Date: Mon, 14 Mar 2016 03:45:34 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0

On 03/14/2016 03:30 AM, Stefan Monnier wrote:

So I have to wonder why the "get out of a comment" feature is used in C/l
mode so much that it becomes a bottleneck, and you get significant
improvement in performance by dropping the caching logic to C. That is, of
course, not a nice thing to ask considering the overall complexity of CC
Mode, but still.

Hmm... I get the impression that maybe there's some confusion here.
The current "get out of a comment" feature doesn't use syntax-ppss.

Maybe I should rephrase that: why is it important to be a lot faster than syntax-ppss? Because speed seems to be the main advantage that Alan's proposal has.

Would using your syntax-ppss approach instead chip away at the reported 80% improvement in the synthetic test, or will it be about as fast?

(As an aside: we do have `comment-beginning', which delegates to syntax-ppss. But it doesn't seem to be widely used.)

I don't see anything comparable to 10 second waiting described in
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22884, when doing a comparable
operation in a 5000-line Ruby file.

Ruby's comment syntax is easier to parse backward than C's (because
there's only one syntax style, rather than 2),

There are two:

#

and

=begin
=end

The latter one gets handled in ruby-syntax-propertize, so I don't know if it's relevant.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]