[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ntemacs hangs when openning the attached file
From: |
Eli Zaretskii |
Subject: |
Re: ntemacs hangs when openning the attached file |
Date: |
Wed, 07 May 2008 11:48:47 +0300 |
> Date: Wed, 7 May 2008 12:01:38 +0800
> From: "yu jie" <address@hidden>
>
> The current CVS header version hangs when openning the attached file.
No, it doesn't hang, it just takes a lot of time to visit this file.
I measured 61 seconds on a 3GHz machine. This file has 86406 lines,
and uses some pretty non-standard formatting, such as this one:
static int simpleNext(
sqlite3_tokenizer_cursor *pCursor, /* Cursor returned by simpleOpen */
const char **ppToken, /* OUT: *ppToken is the token text */
int *pnBytes, /* OUT: Number of bytes in token */
int *piStartOffset, /* OUT: Starting offset of token */
int *piEndOffset, /* OUT: Ending offset of token */
int *piPosition /* OUT: Position integer of token */
){
It also uses long comments formatted like this:
/*
** Additional bit values that can be ORed with an affinity without
** changing the affinity.
*/
I'm guessing that this formatting coupled with the sheer size of the
file somehow triggers an inefficiency.
I didn't dig into the problem deep enough to find the actual culprit,
but if I run Emacs under GDB and interrupt it during the long wait, I
always see the following Lisp backtrace:
"parse-partial-sexp" (0x82e9c4)
"c-literal-limits" (0x82eb14)
"c-neutralize-syntax-in-CPP" (0x82ec64)
"c-common-init" (0x82edb4)
"c-mode" (0x82eef4)
"set-auto-mode-0" (0x82f034)
"set-auto-mode" (0x82f110)
"normal-mode" (0x82f454)
"after-find-file" (0x82f5a4)
"find-file-noselect-1" (0x82f6e4)
"find-file-noselect" (0x82f834)
"find-file" (0x82f984)
"call-interactively" (0x82fc04)
This seems not to be related to fontification, but rather to something
that c-neutralize-syntax-in-CPP does during C Mode initialization.
Re: ntemacs hangs when openning the attached file, Richard M Stallman, 2008/05/07