From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: ntemacs hangs when openning the attached file Date: Tue, 20 May 2008 16:13:03 +0000 Message-ID: <20080520161303.GC3729@muc.de> References: <42b562540805062101s3e79eecel5ddc5b19821deda2@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1211298839 22758 80.91.229.12 (20 May 2008 15:53:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 20 May 2008 15:53:59 +0000 (UTC) Cc: Eli Zaretskii , yu jie , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 20 17:54:36 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JyUA5-0004zH-Ps for ged-emacs-devel@m.gmane.org; Tue, 20 May 2008 17:54:02 +0200 Original-Received: from localhost ([127.0.0.1]:56057 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JyU9L-0003Ck-Jp for ged-emacs-devel@m.gmane.org; Tue, 20 May 2008 11:53:15 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JyU9I-0003CV-0W for emacs-devel@gnu.org; Tue, 20 May 2008 11:53:12 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JyU9F-0003CE-Mc for emacs-devel@gnu.org; Tue, 20 May 2008 11:53:10 -0400 Original-Received: from [199.232.76.173] (port=36383 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JyU9F-0003CB-IK for emacs-devel@gnu.org; Tue, 20 May 2008 11:53:09 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:2087 helo=mail.muc.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JyU9F-0006cY-1S for emacs-devel@gnu.org; Tue, 20 May 2008 11:53:09 -0400 Original-Received: (qmail 73337 invoked by uid 3782); 20 May 2008 15:53:01 -0000 Original-Received: from acm.muc.de (pD9E53F3A.dip.t-dialin.net [217.229.63.58]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Tue, 20 May 2008 17:52:58 +0200 Original-Received: (qmail 12005 invoked by uid 1000); 20 May 2008 16:13:03 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) X-Primary-Address: acm@muc.de X-detected-kernel: by monty-python.gnu.org: FreeBSD 4.6-4.9 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:97450 Archived-At: Stefan, Eli, On Wed, May 07, 2008 at 11:48:47AM +0300, Eli Zaretskii wrote: > > Date: Wed, 7 May 2008 12:01:38 +0800 > > From: "yu jie" > > 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 at 1 line per second would take just over a day to print. This is a big file. > I'm guessing that this formatting coupled with the sheer size of the > file somehow triggers an inefficiency. [ .... ] > This seems not to be related to fontification, but rather to something > that c-neutralize-syntax-in-CPP does during C Mode initialization. It's just that c-neutralize-syntax-in-CPP takes a long time in such a large buffer. However, it would take just as long if it were split into several smaller buffers. c-neutralize-syntax-in-CPP is a newish function which counteracts problems cause by things like: #define RBRACE } . The answer would seem to be calling the function lazily or in the background, a bit like jit-lock does for font locking. Stefan, I think you mentioned a long time ago that jit could be used for things other than font locking, but I can't find the thread. Any clues? -- Alan Mackenzie (Nuremberg, Germany).