From: Eli Zaretskii <eliz@gnu.org>
To: yu jie <yujie052@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: ntemacs hangs when openning the attached file
Date: Wed, 07 May 2008 11:48:47 +0300 [thread overview]
Message-ID: <uy76mebyo.fsf@gnu.org> (raw)
In-Reply-To: <42b562540805062101s3e79eecel5ddc5b19821deda2@mail.gmail.com>
> Date: Wed, 7 May 2008 12:01:38 +0800
> From: "yu jie" <yujie052@gmail.com>
>
> 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.
next parent reply other threads:[~2008-05-07 8:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <42b562540805062101s3e79eecel5ddc5b19821deda2@mail.gmail.com>
2008-05-07 8:48 ` Eli Zaretskii [this message]
2008-05-20 16:13 ` ntemacs hangs when openning the attached file Alan Mackenzie
2008-05-22 4:42 ` Stefan Monnier
2008-05-23 21:01 ` Alan Mackenzie
2008-05-23 21:36 ` Stefan Monnier
2008-05-24 13:16 ` Alan Mackenzie
2008-05-24 8:18 ` Eli Zaretskii
2008-05-24 13:17 ` Alan Mackenzie
2008-05-07 17:34 ` Richard M Stallman
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=uy76mebyo.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=yujie052@gmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.