From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#11545: 24.0.96-mac-2.92; Strange speed problem scrolling in C++ code Date: Fri, 25 May 2012 21:45:47 +0000 Message-ID: <20120525214547.GA5177@acm.acm> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1337982555 751 80.91.229.3 (25 May 2012 21:49:15 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 25 May 2012 21:49:15 +0000 (UTC) Cc: mituharu+bug-gnu-emacs-mac@math.s.chiba-u.ac.jp, 11545@debbugs.gnu.org To: John Wiegley Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri May 25 23:49:13 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SY2Ng-0008E6-HI for geb-bug-gnu-emacs@m.gmane.org; Fri, 25 May 2012 23:49:08 +0200 Original-Received: from localhost ([::1]:58679 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SY2Ng-0005lN-3k for geb-bug-gnu-emacs@m.gmane.org; Fri, 25 May 2012 17:49:08 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:33087) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SY2Nd-0005lI-DX for bug-gnu-emacs@gnu.org; Fri, 25 May 2012 17:49:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SY2Nb-0004Mp-Nl for bug-gnu-emacs@gnu.org; Fri, 25 May 2012 17:49:04 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34127) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SY2NY-0004ML-Mz; Fri, 25 May 2012 17:49:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SY2OY-00007f-93; Fri, 25 May 2012 17:50:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Fri, 25 May 2012 21:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11545 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: Original-Received: via spool by 11545-submit@debbugs.gnu.org id=B11545.1337982592449 (code B ref 11545); Fri, 25 May 2012 21:50:02 +0000 Original-Received: (at 11545) by debbugs.gnu.org; 25 May 2012 21:49:52 +0000 Original-Received: from localhost ([127.0.0.1]:43673 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SY2ON-00007B-Ag for submit@debbugs.gnu.org; Fri, 25 May 2012 17:49:52 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:46961 helo=mail.muc.de) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SY2O1-00006l-Nj for 11545@debbugs.gnu.org; Fri, 25 May 2012 17:49:49 -0400 Original-Received: (qmail 1421 invoked by uid 3782); 25 May 2012 21:48:23 -0000 Original-Received: from acm.muc.de (pD95562B2.dip.t-dialin.net [217.85.98.178]) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 25 May 2012 23:48:18 +0200 Original-Received: (qmail 5504 invoked by uid 1000); 25 May 2012 21:45:47 -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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:60361 Archived-At: Hello John, On Wed, May 23, 2012 at 05:28:24AM -0500, John Wiegley wrote: > >>>>> Glenn Morris writes: > > I see hundreds of lines of differences between the emacs-23 and emacs-24 > > branch versions of cc-fonts. > Sorry, tool failure here. Now I'm seeing: > 660 insertions(+), 243 deletions(-) > > PS The context for this bug report is missing; but I imagine the first thing > > Alan will ask for is an example that shows how to reproduce the problem. > Start either Emacs with -Q -nw. Open a largish C++ file. Hold down C-v. On > my laptop the lagginess was quite obvious, on my desktop a little less so. This has been the case for some while, as you have said. The offending function is probably c-font-lock-enclosing-decls, a relatively new function. c-f-l-e-decls solves the former problem of misfontification when a jit-lock chunk started within (mainly) a struct/enum/union/class/... and lacked the context to fontify correctly. An example of this happening was the first enum construct in .../emacs/src/gnutls.h. Could you possibly check this is the case in your file.c++ using elp. Here's a quick recipe in case you haven't used it before: [ M-x elp-instrument-package c- . Scroll with C-v, either once or an arbitrary number of times. M-x elp-results.] The cost of this correct fontification is the "slight" sluggishness being seen here. It is likely possible to optimise this function somewhat, though probably it's now too late for Emacs 24.1. > Thanks, John -- Alan Mackenzie (Nuremberg, Germany).