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: C mode too slow Date: Sun, 12 Jun 2011 20:38:11 +0000 Message-ID: <20110612203811.GA10061@acm.acm> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1307911247 16939 80.91.229.12 (12 Jun 2011 20:40:47 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 12 Jun 2011 20:40:47 +0000 (UTC) To: emacs-devel@gnu.org, Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 12 22:40:41 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QVrSa-00039F-PA for ged-emacs-devel@m.gmane.org; Sun, 12 Jun 2011 22:40:40 +0200 Original-Received: from localhost ([::1]:35394 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QVrSZ-0002Jd-Tb for ged-emacs-devel@m.gmane.org; Sun, 12 Jun 2011 16:40:40 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:49787) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QVrSI-0002J6-0E for emacs-devel@gnu.org; Sun, 12 Jun 2011 16:40:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QVrSG-0006l6-6t for emacs-devel@gnu.org; Sun, 12 Jun 2011 16:40:21 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:4700 helo=mail.muc.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QVrSF-0006kj-II for emacs-devel@gnu.org; Sun, 12 Jun 2011 16:40:20 -0400 Original-Received: (qmail 81964 invoked by uid 3782); 12 Jun 2011 20:40:16 -0000 Original-Received: from acm.muc.de (pD955654C.dip.t-dialin.net [217.85.101.76]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Sun, 12 Jun 2011 22:39:33 +0200 Original-Received: (qmail 10193 invoked by uid 1000); 12 Jun 2011 20:38:11 -0000 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 4.6-4.9 X-Received-From: 193.149.48.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:140399 Archived-At: Hi, Stefan >> _and_ because editing lisp.h is virtually impossible these days. I >> have to use an old Emacs - almost each editing step takes about 15 >> secs here with the more recent Emacs versions :-( > I tend to find editing code such as lisp.h too slow as well. Can we > do something about it? lisp.h is slow in "brace desserts", since CC Mode uses braces as anchor points, particularly whilst font locking. This should have been fixed by the optimisation of c-parse-state. However, comparing the trunk with Emacs 23.3 the number of calls to c-parse-state has increased by a factor of ~9, cancelling out the optimisation. :-( I'm looking to see why this has happened. I'm actually looking at a large file (without a single brace) called AT91SAM9263_INC.h, the one which triggered this optimisation. What seems to me slow in lisp.h is scrolling over areas which haven't yet been fontified since loading. Once that is done, I think things move at a decent speed. Is there anything particular, other than initial scrolling, which is very slow in lisp.h? -- Alan Mackenzie (Nuremberg, Germany).