unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Permission requested to merge branch comment-cache into master.
@ 2016-03-12  0:28 Alan Mackenzie
  2016-03-12  7:32 ` Eli Zaretskii
                   ` (2 more replies)
  0 siblings, 3 replies; 31+ messages in thread
From: Alan Mackenzie @ 2016-03-12  0:28 UTC (permalink / raw)
  To: John Wiegley; +Cc: emacs-devel

Hello, John.

Could I merge branch comment-cache into master, please?

Background:

in bug #22884, Paul reported a simple edit in config.h taking around 10
seconds to echo.  The cause was an open parenthesis in column zero which
Emacs's low level routines (in syntax.c) wrongly parsed as a start of
defun.

I have reformulated and grossly simplified the routines which scan
comments, now scanning them exclusively in the forward direction (which
is easy) and recording them (and strings) with text properties.  The old
routines attempt (and sometimes fail) to scan comments going backwards.
Parentheses in column zero have entirely ceased to be an issue - there
is no longer even code to handle them.  (OK, the old code is still there
- I haven't removed it yet.)

The new scheme adds a small time overhead (~0.25s to scan xdisp.c on my
6 y.o. machine), and will also use a modest amount of extra storage for
the text properties.  After the initial scan, movement over comments is
lightening fast.

I am confident that the new approach is right, and I am confident the
new code is reliable and ready for prime time, even if, perhaps, not yet
entirely bug-free.

Alternatives:

An alternative approach using the syntax-ppss cache has been discussed
and tried.  For reasons currently being discussed in bug #22983:
(syntax-ppss returns wrong result) and the emacs-devel thread "Problems
with syntax-ppss: Was [... Apply `comment-depth' text properties when
calling `back_comment'.]", this approach cannot work.  It also does
nothing to tame the complexity of the current comment scanning routines.

So, I'd like to merge branch comment-cache, at least on a trial basis.
What do you say?

-- 
Alan Mackenzie (Nuremberg, Germany).



^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2016-03-14 15:58 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-12  0:28 Permission requested to merge branch comment-cache into master Alan Mackenzie
2016-03-12  7:32 ` Eli Zaretskii
2016-03-12 10:08   ` Alan Mackenzie
2016-03-12 11:14     ` Eli Zaretskii
2016-03-12 11:50       ` Alan Mackenzie
2016-03-12 12:31         ` Eli Zaretskii
2016-03-12 13:11           ` Alan Mackenzie
2016-03-12 21:38           ` John Wiegley
2016-03-12 23:17             ` Alan Mackenzie
2016-03-13  0:02               ` John Wiegley
2016-03-13 15:20                 ` Alan Mackenzie
2016-03-13 16:04                   ` Clément Pit--Claudel
2016-03-13 16:12                     ` Dmitry Gutov
2016-03-13 19:12                     ` Alan Mackenzie
2016-03-13 22:27                       ` Stefan Monnier
2016-03-13 22:52                         ` Alan Mackenzie
2016-03-13 23:38                           ` Clément Pit--Claudel
2016-03-14  0:20                           ` Stefan Monnier
2016-03-14  6:32                           ` Andreas Röhler
2016-03-14 11:27                             ` Alan Mackenzie
2016-03-13 17:07                   ` John Wiegley
2016-03-13 19:04                     ` Alan Mackenzie
2016-03-14  0:25                   ` Dmitry Gutov
2016-03-14  1:11                   ` Stefan Monnier
2016-03-14 13:28                     ` Alan Mackenzie
2016-03-14 15:58                       ` Stefan Monnier
2016-03-13 18:03               ` Eli Zaretskii
2016-03-12 13:23 ` Dmitry Gutov
2016-03-12 14:06   ` Alan Mackenzie
2016-03-12 21:39   ` John Wiegley
2016-03-13 17:22 ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).