emacs-devel
[Top][All Lists]
Advanced

[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: Tue, 27 Dec 2016 16:11:50 +0000
User-agent: Mutt/1.5.24 (2015-08-30)

Hello, Richard.

On Sat, Dec 24, 2016 at 01:54:27PM -0500, Richard Stallman wrote:
> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]

>   >                    First forward run     Backwards     Second forward run

>   > master:                 34.100s            36.050s           34.575s 

>   > comment-cache:          30.110s            32.275s         34.990s

> Judging by those figures, it seems to be a rather small improvement.
> Is it worth adding complexity to get a 13% speedup in one operation?

Sorry for not being clear over the motivation, here.  Lots of bugs
happen in CC Mode because of the convention "open paren at column 0 is
defun start".  I would like these bugs to stop happening completely,
which was why I designed and coded up branch comment-cache.

I gave the timings to show that the comment-cache code isn't
significantly _slower_ than the existing code in syntax.c.

The bugs happen in (e.g.) C Mode when somebody writes, say, a "(" in
column zero inside a comment.  This happened in the Emacs C source in
March 2016, when a "(" in the GPL 3 licence statement found itself in
column zero.  This showed itself as a simple insert operation taking
inordinately long (~10s) to redisplay.  This was reported by Paul Eggert
as bug #22884.

Other manifestations of this "bug" have been reported since bug #22884.

Setting open-paren-in-column-0-is-defun-start to nil solves the problem,
but at the unacceptable cost of making CC Mode much slower (and it's not
the fastest mode in the first place).

> -- 
> Dr Richard Stallman

-- 
Alan Mackenzie (Nuremberg, Germany).



reply via email to

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