unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Chong Yidong <cyd@stupidchicken.com>
To: Alan Mackenzie <acm@muc.de>
Cc: martin rudalics <rudalics@gmx.at>,
	Stefan Monnier <monnier@iro.umontreal.ca>,
	emacs-devel@gnu.org
Subject: Re: Emacs 22.2 release plans - request for a slight delay.
Date: Thu, 06 Mar 2008 18:19:54 -0500	[thread overview]
Message-ID: <87lk4vv3s5.fsf@stupidchicken.com> (raw)
In-Reply-To: <20080306223857.GC3049@muc.de> (Alan Mackenzie's message of "Thu\, 6 Mar 2008 22\:38\:57 +0000")

Hi Alan,

> It's me again, causing trouble.  ;-(

It's OK.

> I'm asking for a slight delay (perhaps over the weekend?) to fix a
> serious bug in C mode, namely:
>
>     Visit lisp.h, go to the end of the buffer, and do
>     M-x RET c-beginning-of-defun RET
>
> This is horrendously slow (~30 seconds).
>
> I've just had a look at c-beginning-of-defun, and I've narrowed the
> fault down to `c-in-knr-argdecl', where the code laboriously trundles
> back one paren pair at a time until it finds a "}" (or BOB).  This is
> clearly suboptimal in a region with several hundred consecutive
> declarations without brace-blocks.  There are ~900 consecutive
> paren-pairs in the tail of lisp.h.
>
> So perhaps if I put the limit at 32, this will be safe for any
> function not appearing in the Obfuscated C competition or
> deliberately written to break editors.  :-)
>
> This will probably be a "quick and easy" change, taking, perhaps, an
> hour.  However, it's probably worth while doing it calmly and carefully.
> ;-)

[Alan later sent a patch to me off-list.]

First off, could you check the patch into the trunk?  Thanks.

I would like more information before we decide whether or not to check
it into the branch and/or delay the pretest.

First off, I just did a quick test, and the slowness also occurs in
Emacs 22.1.  It doesn't seem to be slower than in 22.1 (i.e. a
regression), but I didn't time this precisely.  Is there any reason to
believe that the problem has gotten worse since 22.1, e.g. due to
changes to CC mode since the 22.1 release?

Secondly, if memory serves, c-beginning-of-defun is not only used
interactively, but also for font-lock.  Is this correct?  If so, is
there a possibility that quitting from the paren-parsing loop in this
way will screw up font-lock?




  reply	other threads:[~2008-03-06 23:19 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-25 19:53 Emacs 22.2 release plans Chong Yidong
2008-03-05 17:25 ` Chong Yidong
2008-03-05 23:58   ` Kim F. Storm
2008-03-06  0:38     ` Glenn Morris
2008-03-06 11:19       ` Kim F. Storm
2008-03-06 15:16         ` Dan Nicolaescu
2008-03-06 15:51           ` Jason Rumney
2008-03-06 16:12             ` Dan Nicolaescu
2008-03-06 17:32             ` Stefan Monnier
2008-03-06 17:31           ` Stefan Monnier
2008-03-06 18:56       ` Chong Yidong
2008-03-07 10:55         ` Kim F. Storm
2008-03-06 22:38   ` Emacs 22.2 release plans - request for a slight delay Alan Mackenzie
2008-03-06 23:19     ` Chong Yidong [this message]
2008-03-07  7:25       ` Alan Mackenzie
2008-03-07 16:17         ` Chong Yidong
2008-03-07 23:15           ` Alan Mackenzie
2008-03-07 23:04             ` Chong Yidong
2008-03-07 23:33               ` Nick Roberts
2008-03-07 23:24       ` Alan Mackenzie

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lk4vv3s5.fsf@stupidchicken.com \
    --to=cyd@stupidchicken.com \
    --cc=acm@muc.de \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=rudalics@gmx.at \
    /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 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).