all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: The current state of the comment-cache branch
Date: Sat, 24 Dec 2016 09:42:46 +0000	[thread overview]
Message-ID: <20161224094246.GD2212@acm.fritz.box> (raw)
In-Reply-To: <83bmw1zoy8.fsf@gnu.org>

On Sat, Dec 24, 2016 at 10:55:11AM +0200, Eli Zaretskii wrote:
> > Date: Sat, 24 Dec 2016 08:30:55 +0000
> > Cc: emacs-devel@gnu.org
> > From: Alan Mackenzie <acm@muc.de>

> > > >                    First forward run     Backwards     Second forward run

> > > > master:                 34.100s            36.050s	   34.575s 

> > > > comment-cache:          30.110s            32.275s         34.990s
> > > > [...]
> > > > I would like the comment-cache code to be merged into master soon.

> > > Given that the speed-up is around 11% - 13%, and only for the first
> > > scan, what are the other advantages/benefits of this code that would
> > > cause us to merge it?

> > The prime advantage is that we would support open parens in column 0
> > inside comments.  Not through some awkward workaround, but through a
> > change in algorithm, by which these open parens simply aren't even an
> > issue any more.

> > The timings I gave were intented to refute in advance any suggestion
> > that the new code might slow Emacs down, the way setting
> > open-paren-in-column-0-is-defun-start to nil does.

> Can you show similar timings with that variable set to nil?  And in
> particular in the use case reported by Paul back when bug#22884 was
> filed?

master:                        101.939s            95.049s        103.546s
(with open-paren-... nil)

> (I'm actually unsure I understand how binding that variable to nil
> will slow down Emacs, as in the bug in question such a binding was
> proposed as a _solution_ to slow-down.  What am I missing?)

In bug #22884, the pathological ~10s to insert a single character was
caused by continual repeated scanning between the ostensible BOD (i.e.
the "(" in column 0) and point.  IIRC, it was around 45k characters.  In
this particular case, setting open-paren-....-start to nil would indeed
have increased the speed.

This slowdown in Paul's config.h no longer happens, because of a
workaround put into syntax.c, I can't remember exactly what or when.
However, just last week, there was yet one more bug reported to CC Mode
about indentation, whose cause was a paren in C0 inside a comment.  I
would like these bug reports to cease.  As you said back in March, Emacs
should be able to handle these, as they are valid C.

But in general, having open-paren-....-start at nil slows down Emacs
massively, as shown above.  In CC Mode, this variable was bound to nil
around critical syntactic functions for some time, but this caused
complaints (in particular, from Martin Rudalics, and I think, from
yourself, too) at the slowdown.

-- 
Alan Mackenzie (Nuremberg, Germany).



  reply	other threads:[~2016-12-24  9:42 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-23 21:50 The current state of the comment-cache branch Alan Mackenzie
2016-12-24  1:32 ` Stefan Monnier
2016-12-24  9:07   ` Alan Mackenzie
2016-12-24  1:33 ` Stefan Monnier
2016-12-24  8:40   ` Alan Mackenzie
2016-12-24 20:56   ` Stephen Leake
2016-12-25 15:47     ` Stefan Monnier
2016-12-25 20:41     ` Richard Stallman
2016-12-24  8:02 ` Eli Zaretskii
2016-12-24  8:30   ` Alan Mackenzie
2016-12-24  8:55     ` Eli Zaretskii
2016-12-24  9:42       ` Alan Mackenzie [this message]
2016-12-24 11:11         ` Elias Mårtenson
2016-12-24 11:36           ` Alan Mackenzie
2016-12-24 12:00             ` Eli Zaretskii
2016-12-24 21:48               ` Andreas Röhler
     [not found]             ` <CADtN0W+7zHzuoWFrzs6MuonUM74D_dC+yh10rSk+r0nuxgeTBg@mail.gmail.com>
     [not found]               ` <CADtN0WJYXRg=oEBxn3UPjF6RFJG62nG4GpUFaphdkj9Egde_4Q@mail.gmail.com>
2016-12-24 12:21                 ` Elias Mårtenson
2016-12-27 17:55                   ` Alan Mackenzie
2016-12-28 15:36                     ` Eli Zaretskii
2016-12-28 16:42                       ` Alan Mackenzie
2016-12-28 16:45                       ` Nikolaus Rath
2016-12-28 17:09                         ` Eli Zaretskii
2016-12-28 23:58                           ` Nikolaus Rath
2016-12-29  3:43                             ` Eli Zaretskii
2016-12-29 16:56                               ` Nikolaus Rath
2016-12-29 17:46                                 ` Eli Zaretskii
2016-12-29 19:44                                   ` Alan Mackenzie
2016-12-30 10:29                                     ` Andreas Röhler
2017-01-03 17:39                                       ` Stefan Monnier
2017-01-20 18:58                                         ` Andreas Röhler
2017-01-20 21:48                                           ` Stefan Monnier
2017-01-21  9:06                                             ` Andreas Röhler
2017-01-22  4:28                                               ` Stefan Monnier
2016-12-28 17:15                         ` Stefan Monnier
2016-12-29  1:38                           ` Richard Stallman
2016-12-29  2:15                             ` Stefan Monnier
2016-12-24 12:27         ` Eli Zaretskii
2016-12-24 22:19           ` Paul Eggert
2016-12-25 16:07           ` Stefan Monnier
2016-12-25 16:30             ` Eli Zaretskii
2016-12-28  8:37             ` Alan Mackenzie
2016-12-28 17:02               ` Stefan Monnier
2016-12-28 17:10               ` Stefan Monnier
2016-12-27 16:40           ` Alan Mackenzie
2016-12-28 15:35             ` Eli Zaretskii
2016-12-28 16:35               ` Alan Mackenzie
2016-12-24 18:54 ` Richard Stallman
2016-12-27 16:11   ` Alan Mackenzie
2016-12-28  1:40     ` Dmitry Gutov
2016-12-28  7:54       ` Alan Mackenzie
2016-12-29  1:13         ` Dmitry Gutov

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=20161224094246.GD2212@acm.fritz.box \
    --to=acm@muc.de \
    --cc=eliz@gnu.org \
    --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.