[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: The current state of the comment-cache branch
From: |
Alan Mackenzie |
Subject: |
Re: The current state of the comment-cache branch |
Date: |
Sat, 24 Dec 2016 09:42:46 +0000 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
On Sat, Dec 24, 2016 at 10:55:11AM +0200, Eli Zaretskii wrote:
> > Date: Sat, 24 Dec 2016 08:30:55 +0000
> > Cc: address@hidden
> > From: Alan Mackenzie <address@hidden>
> > > > 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).
- Re: The current state of the comment-cache branch, (continued)
- Re: The current state of the comment-cache branch, Stefan Monnier, 2016/12/23
- Re: The current state of the comment-cache branch, Stefan Monnier, 2016/12/23
- Re: The current state of the comment-cache branch, Eli Zaretskii, 2016/12/24
- Re: The current state of the comment-cache branch, Alan Mackenzie, 2016/12/24
- Re: The current state of the comment-cache branch, Eli Zaretskii, 2016/12/24
- Re: The current state of the comment-cache branch,
Alan Mackenzie <=
- Re: The current state of the comment-cache branch, Elias Mårtenson, 2016/12/24
- Re: The current state of the comment-cache branch, Alan Mackenzie, 2016/12/24
- Re: The current state of the comment-cache branch, Eli Zaretskii, 2016/12/24
- Re: The current state of the comment-cache branch, Andreas Röhler, 2016/12/24
- Message not available
- Message not available
- Re: The current state of the comment-cache branch, Elias Mårtenson, 2016/12/24
- Re: The current state of the comment-cache branch, Alan Mackenzie, 2016/12/27
- Re: The current state of the comment-cache branch, Eli Zaretskii, 2016/12/28
- Re: The current state of the comment-cache branch, Alan Mackenzie, 2016/12/28
- Re: The current state of the comment-cache branch, Nikolaus Rath, 2016/12/28
- Re: The current state of the comment-cache branch, Eli Zaretskii, 2016/12/28