From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.cc-mode.general,gmane.emacs.bugs Subject: Re: 24.0.96-mac-2.92; Strange speed problem scrolling in C++ code Date: Sat, 2 Jun 2012 21:20:28 +0000 Message-ID: <20120602212028.GA8233@acm.acm> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1338672618 30967 80.91.229.3 (2 Jun 2012 21:30:18 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 2 Jun 2012 21:30:18 +0000 (UTC) Cc: bug-cc-mode@gnu.org, bug-gnu-emacs@gnu.org, mituharu+bug-gnu-emacs-mac@math.s.chiba-u.ac.jp, YAMAMOTO Mitsuharu To: John Wiegley Original-X-From: cc-mode-help-bounces@lists.sourceforge.net Sat Jun 02 23:30:16 2012 Return-path: Envelope-to: sf-cc-mode-help@m.gmane.org Original-Received: from lists.sourceforge.net ([216.34.181.88]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Savtm-0007Yk-7J for sf-cc-mode-help@m.gmane.org; Sat, 02 Jun 2012 23:30:14 +0200 Original-Received: from localhost ([127.0.0.1] helo=sfs-ml-2.v29.ch3.sourceforge.com) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1Savtf-00086R-A0; Sat, 02 Jun 2012 21:30:07 +0000 Original-Received: from sog-mx-1.v43.ch3.sourceforge.com ([172.29.43.191] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1Savte-00086L-1G for cc-mode-help@lists.sourceforge.net; Sat, 02 Jun 2012 21:30:06 +0000 Received-SPF: neutral (sog-mx-1.v43.ch3.sourceforge.com: 208.118.235.10 is neither permitted nor denied by domain of muc.de) client-ip=208.118.235.10; envelope-from=acm@muc.de; helo=fencepost.gnu.org; Original-Received: from fencepost.gnu.org ([208.118.235.10]) by sog-mx-1.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) id 1Savtc-0004K7-Mp for cc-mode-help@lists.sourceforge.net; Sat, 02 Jun 2012 21:30:05 +0000 Original-Received: from eggs.gnu.org ([208.118.235.92]:41691) by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1SavtW-00028D-HE for bug-cc-mode@gnu.org; Sat, 02 Jun 2012 17:29:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SavtT-0001L7-Pt for bug-cc-mode@gnu.org; Sat, 02 Jun 2012 17:29:57 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 Original-Received: from colin.muc.de ([193.149.48.1]:48229 helo=mail.muc.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SavtT-0001Kj-FN for bug-cc-mode@gnu.org; Sat, 02 Jun 2012 17:29:55 -0400 Original-Received: (qmail 31164 invoked by uid 3782); 2 Jun 2012 21:23:11 -0000 Original-Received: from acm.muc.de (pD9519ED0.dip.t-dialin.net [217.81.158.208]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 02 Jun 2012 23:23:10 +0200 Original-Received: (qmail 8278 invoked by uid 1000); 2 Jun 2012 21:20:29 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 193.149.48.1 X-Spam-Score: 0.7 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 0.7 SPF_NEUTRAL SPF: sender does not match SPF record (neutral) X-Headers-End: 1Savtc-0004K7-Mp X-BeenThere: cc-mode-help@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: "Bug reports, feature requests, and general talk about CC Mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: cc-mode-help-bounces@lists.sourceforge.net Xref: news.gmane.org gmane.emacs.cc-mode.general:5844 gmane.emacs.bugs:60644 Archived-At: Hello, John. On Mon, May 28, 2012 at 06:05:15PM -0500, John Wiegley wrote: > >>>>> John Wiegley writes: > >>>>>> YAMAMOTO Mitsuharu writes: > >> With the Time Profiler in Instrument.app, I found that fontification > >> of CC Mode in Emacs 24 is much heavier and causes frequent GCs than > >> that in Emacs 23. Please try the following: > >> 1. Start Emacs 24 Mac port with -Q (alternatively, pressing the > >> shift key.) > >> 2. M-x load-file PREFIX/share/emacs/23.4/lisp/progmodes/cc-fonts.elc > >> RTE. > >> 3. Replay scrolling a large C++ file. > >> I'm not sure if this slowdown is intended or expected. > > Indeed, this makes the speed situation much better on Emacs 24.0.97. > I can now confirm that loading CC-Mode 5.32.3 into Emacs 23.4 causes > the identical speed issues that I was seeing with Emacs 24.0.97, so > this is a performance issue in the latest CC-Mode, not a bug in Emacs > 24 or with Mac-Port Emacs. > To the CC-Mode maintainers: is there a way to disable the slower, "more > correct" mode in the latest CC-Mode, and go back to the entirely > sufficient (for me) mode of previous versions? Not as such, no. The only workaround at the moment is to use a "pre-correct" version of CC Mode in place of an up to date one. I've just done a binary chop on CC Mode versions, and it seems the latest version before (?the first of) these enhancements was the one created by this (mercurial) changeset (the repository can be downloaded from ): changeset: 5109:981fa4f0270c parent: 5107:bd4013c5633b user: acmacm date: Wed Sep 15 17:47:52 2010 +0000 files: cc-engine.el description: (c-forward-<>-arglist-recur): Fix an infinite recursion. To undo these changes would be difficult, since several later enhancements and bug fixes are based on the new code. I'll see if I can find some way of optimising the offending code - most of the time it's doing expensive checks and finding nothing. Anyhow, I've got the problem flagged as a bug now. Thanks again for reporting it. > Thanks, > John -- Alan Mackenzie (Nuremberg, Germany). ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/