unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* C mode fontification took 50 seconds
@ 2007-04-28 18:35 Richard Stallman
  2007-04-30  1:38 ` Glenn Morris
  2007-05-01 18:39 ` Alan Mackenzie
  0 siblings, 2 replies; 5+ messages in thread
From: Richard Stallman @ 2007-04-28 18:35 UTC (permalink / raw)
  To: emacs-devel, bug-cc-mode

Using the latest version of Emacs 22 files, in a 48-line Linux console,
I visited the file xdisp.c and typed C-u 23402 C-n.
Then I typed C-v and waited.

After it had gone on for 30 seconds, I stopped the process and looked
at it with GDB.  xbacktrace gives c-syntactic-skip-backward,
c-in-knr-argdecl, c-beginning-of-decl-1, further up
c-beginning-of-defun, further up, c-parse-state,
c-font-lock-complex-decl-prepare.  This was called
from font-lock-fontify-keywords-region.

It looks like c-in-knr-argdecl has the infinite loop.

After I continued, it eventually finished, but yuck!

This is reproducible.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/


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

* Re: C mode fontification took 50 seconds
  2007-04-28 18:35 C mode fontification took 50 seconds Richard Stallman
@ 2007-04-30  1:38 ` Glenn Morris
  2007-05-01 17:25   ` Richard Stallman
  2007-05-01 18:39 ` Alan Mackenzie
  1 sibling, 1 reply; 5+ messages in thread
From: Glenn Morris @ 2007-04-30  1:38 UTC (permalink / raw)
  To: rms; +Cc: bug-cc-mode, emacs-devel

Richard Stallman wrote:

> Using the latest version of Emacs 22 files, in a 48-line Linux console,
> I visited the file xdisp.c and typed C-u 23402 C-n.
> Then I typed C-v and waited.

It takes no noticeable time for me on a 1.7GHz laptop. Did you
bootstrap? Failure to do so has been seen to cause spurious cc-mode
issues in the past.


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/


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

* Re: C mode fontification took 50 seconds
  2007-04-30  1:38 ` Glenn Morris
@ 2007-05-01 17:25   ` Richard Stallman
  2007-05-02  0:13     ` Richard Stallman
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Stallman @ 2007-05-01 17:25 UTC (permalink / raw)
  To: Glenn Morris; +Cc: bug-cc-mode, emacs-devel

    It takes no noticeable time for me on a 1.7GHz laptop. Did you
    bootstrap?

I just about never bootstrap, since I already have compiled Lisp files.
I will try that now and see if it makes the problem go away.

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

* Re: C mode fontification took 50 seconds
  2007-04-28 18:35 C mode fontification took 50 seconds Richard Stallman
  2007-04-30  1:38 ` Glenn Morris
@ 2007-05-01 18:39 ` Alan Mackenzie
  1 sibling, 0 replies; 5+ messages in thread
From: Alan Mackenzie @ 2007-05-01 18:39 UTC (permalink / raw)
  To: Richard Stallman; +Cc: bug-cc-mode, emacs-devel

Hi, Richard!

On Sat, Apr 28, 2007 at 02:35:30PM -0400, Richard Stallman wrote:
> Using the latest version of Emacs 22 files, in a 48-line Linux console,
> I visited the file xdisp.c and typed C-u 23402 C-n.
> Then I typed C-v and waited.
> 
> After it had gone on for 30 seconds, I stopped the process and looked
> at it with GDB.  xbacktrace gives c-syntactic-skip-backward,
> c-in-knr-argdecl, c-beginning-of-decl-1, further up
> c-beginning-of-defun, further up, c-parse-state,
> c-font-lock-complex-decl-prepare.  This was called
> from font-lock-fontify-keywords-region.
 
> It looks like c-in-knr-argdecl has the infinite loop.
 
> After I continued, it eventually finished, but yuck!

> This is reproducible.

I don't have this problem.

I made a change to CC Mode on 2007-04-09 to make C-x n d
(`narrow-to-defun') and friends do the right thing.  This involved
changing some macros; all users of the macros therefore needed
recompiling.  

Here, again, is the recipe for recompiling the CC Mode sources: 

(i) M-x byte-compile-file cc-defs.el.  M-x load-file /path/cc-defs.elc
(ii) M-x byte-compile-file cc-langs.el.  M-x load-file /path/cc-langs.elc
(iii) M-x byte-compile-file cc-engine.el.  M-x load-file ../cc-engine.elc
(iv) M-x byte-compile-file cc-mode.el.  M-x load-file ../cc-mode.elc

(v) compile and load cc-{awk,cmds}.el (no dependence on the other four
files).

Either do that, or recompile the entire lot off cc-*.el.  If that
doesn't fix things, please say so.

-- 
Alan Mackenzie (Munich, Germany)

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

* Re: C mode fontification took 50 seconds
  2007-05-01 17:25   ` Richard Stallman
@ 2007-05-02  0:13     ` Richard Stallman
  0 siblings, 0 replies; 5+ messages in thread
From: Richard Stallman @ 2007-05-02  0:13 UTC (permalink / raw)
  To: rms; +Cc: bug-cc-mode, rgm, emacs-devel

Bootstrapping made the problem go away.  So I deleted that item
from FOR-RELEASE.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/


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

end of thread, other threads:[~2007-05-02  0:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-28 18:35 C mode fontification took 50 seconds Richard Stallman
2007-04-30  1:38 ` Glenn Morris
2007-05-01 17:25   ` Richard Stallman
2007-05-02  0:13     ` Richard Stallman
2007-05-01 18:39 ` Alan Mackenzie

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).