From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: John Wiegley Newsgroups: gmane.emacs.bugs Subject: bug#11545: 24.0.96-mac-2.92; Strange speed problem scrolling in C++ code Date: Sat, 26 May 2012 02:46:15 -0500 Message-ID: References: <20120525214547.GA5177@acm.acm> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1338018433 12573 80.91.229.3 (26 May 2012 07:47:13 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 26 May 2012 07:47:13 +0000 (UTC) Cc: mituharu+bug-gnu-emacs-mac@math.s.chiba-u.ac.jp, 11545@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat May 26 09:47:11 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 1SYBiN-00025U-G4 for geb-bug-gnu-emacs@m.gmane.org; Sat, 26 May 2012 09:47:07 +0200 Original-Received: from localhost ([::1]:48969 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SYBiN-0001md-0z for geb-bug-gnu-emacs@m.gmane.org; Sat, 26 May 2012 03:47:07 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:54036) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SYBiJ-0001mV-SG for bug-gnu-emacs@gnu.org; Sat, 26 May 2012 03:47:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SYBiH-0006lO-Ri for bug-gnu-emacs@gnu.org; Sat, 26 May 2012 03:47:03 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34318) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SYBiE-0006eo-QV; Sat, 26 May 2012 03:46:58 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SYBjF-00057u-SB; Sat, 26 May 2012 03:48:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: John Wiegley Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Sat, 26 May 2012 07:48:01 +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.133801847319693 (code B ref 11545); Sat, 26 May 2012 07:48:01 +0000 Original-Received: (at 11545) by debbugs.gnu.org; 26 May 2012 07:47:53 +0000 Original-Received: from localhost ([127.0.0.1]:43864 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SYBj6-00057Z-Gd for submit@debbugs.gnu.org; Sat, 26 May 2012 03:47:53 -0400 Original-Received: from mail-yw0-f44.google.com ([209.85.213.44]:61314) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SYBik-000573-RL for 11545@debbugs.gnu.org; Sat, 26 May 2012 03:47:50 -0400 Original-Received: by yhq56 with SMTP id 56so1038784yhq.3 for <11545@debbugs.gnu.org>; Sat, 26 May 2012 00:46:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=to:cc:subject:references:from:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=6ejLAgKAtJcuYUNq2Q9LK9EjQdIdR2bDSyymYwGmdpI=; b=yaimFmT/BaRqR+c0HvnV3RLhvJpV31CInVoPXtPooew7ARZOQ1W7/i5Vk1kL2hg4u0 NCPTqDDXDVN6OzOZZTdn7zre0TPic/quOHbCHsNEr0mBkEHZpYo63MoCNS8GCPxVoXiE AEYoTxHL5h+2lt0irir6VfdNK5gnhUbFPoFO3r9jzR5uVCMrqfehYwZYqK5suXp09aZZ utycHR1EPMPmVICAzLktYZQtOQaXAIA7kDZnMvmrWPwRTYaBqEEuIU+AQuohEQmCpRa5 ++X/p0FDAPi3H5VQ38AwjWhiLAYMjl+8DCbLsgh1pjWaj1YlQDveei2kGNDM0+xzBFXm tSQw== Original-Received: by 10.42.51.144 with SMTP id e16mr801267icg.54.1338018378898; Sat, 26 May 2012 00:46:18 -0700 (PDT) Original-Received: from vulcan.local (c-98-215-105-167.hsd1.il.comcast.net. [98.215.105.167]) by mx.google.com with ESMTPS id gh2sm1581600igb.9.2012.05.26.00.46.16 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 26 May 2012 00:46:17 -0700 (PDT) Original-Received: by vulcan.local (Postfix, from userid 501) id 72D23E8319D6; Sat, 26 May 2012 02:46:15 -0500 (CDT) In-Reply-To: <20120525214547.GA5177@acm.acm> (Alan Mackenzie's message of "Fri, 25 May 2012 21:45:47 +0000") User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/23.4 (darwin) 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:60367 Archived-At: >>>>> Alan Mackenzie writes: > 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.] Results attached below. > 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. I'd rather forgo the correctness for the speed, since cc-mode has never been 100% correct, but it's always been correct enough. John Function Name Call Count Elapsed Time Average Time c-font-lock-fontify-region 1529 31.313269999 0.0204795748 c-beginning-of-decl-1 3657 11.680622999 0.0031940451 c-font-lock-declarations 1529 11.070964000 0.0072406566 c-find-decl-spots 1529 11.035531000 0.0072174826 c-context-set-fl-decl-start 1529 10.549607 0.0068996775 c-set-fl-decl-start 1529 10.542452999 0.0068949986 c-beginning-of-statement-1 3910 9.8793279999 0.0025266823 c-backward-sws 123582 8.8908430000 7.194...e-05 c-crosses-statement-barrier-p 15967 7.1756169999 0.0004494029 c-parse-state 14667 6.1785950000 0.0004212582 c-parse-state-1 14667 5.6588790000 0.0003858238 c-font-lock-enclosing-decls 1529 4.462361 0.0029184833 c-determine-limit 5498 3.4111050000 0.0006204265 c-append-to-state-cache 14467 2.5331440000 0.0001750980 c-remove-stale-state-cache 14425 2.0322649999 0.0001408849 c-forward-decl-or-cast-1 6632 1.9189249999 0.0002893433 c-beginning-of-macro 164245 1.8161729999 1.105...e-05 c-forward-type 18312 1.5136799999 8.266...e-05 c-in-knr-argdecl 3367 1.5124650000 0.0004492025 c-syntactic-skip-backward 3882 1.3911049999 0.0003583475 c-font-lock-enum-tail 1529 1.1747370000 0.0007683041 c-font-lock-complex-decl-prepare 1529 0.786506 0.0005143924 c-backward-token-2 21271 0.7062790000 3.320...e-05 c-literal-limits 25371 0.7047289999 2.777...e-05 c-at-macro-vsemi-p 30271 0.7038709999 2.325...e-05 c-font-lock-declarators 3723 0.6608859999 0.0001775143 c-forward-name 18056 0.5404579999 2.993...e-05 c-parse-state-get-strategy 14667 0.4485610000 3.058...e-05 c-cheap-inside-bracelist-p 5015 0.4087189999 8.149...e-05 c-forward-sws 60915 0.3506809999 5.756...e-06 c-syntactic-re-search-forward 7741 0.2931619999 3.787...e-05 c-syntactic-content 10849 0.2439560000 2.248...e-05 c-forward-token-2 5974 0.2161999999 3.619...e-05 c-add-type 3181 0.1633079999 5.133...e-05 c-append-lower-brace-pair-to-state-cache 153 0.1180970000 0.0007718758 c-state-semi-safe-place 7045 0.1104430000 1.567...e-05 c-remove-stale-state-cache-backwards 242 0.0868989999 0.0003590867 c-beginning-of-current-token 8514 0.0621019999 7.294...e-06 c-looking-at-inexpr-block 342 0.0573979999 0.0001678304 c-state-get-min-scan-pos 14865 0.0395270000 2.659...e-06 c-get-fallback-scan-pos 106 0.039258 0.0003703584 c-forward-label 274 0.0353939999 0.0001291751 c-get-cache-scan-pos 14667 0.0347800000 2.371...e-06 c-beginning-of-syntax 250 0.0315929999 0.0001263719 c-font-lock-doc-comments 3058 0.0247469999 8.092...e-06 c-safe-position 4286 0.0241799999 5.641...e-06 c-state-literal-at 267 0.0240109999 8.992...e-05 c-on-identifier 694 0.0237040000 3.415...e-05 c-after-conditional 79 0.0234840000 0.0002972658 c-syntactic-end-of-macro 684 0.0193390000 2.827...e-05 c-forward-annotation 6632 0.0187899999 2.833...e-06 c-skip-comments-and-strings 7979 0.0155589999 1.949...e-06 c-punctuation-in 636 0.0123149999 1.936...e-05 c-forward-keyword-clause 831 0.0096369999 1.159...e-05 c-fontify-recorded-types-and-refs 6869 0.0094569999 1.376...e-06 c-state-safe-place 267 0.0069390000 2.598...e-05 c-end-of-macro 2442 0.0062260000 2.549...e-06 c-font-lock-invalid-string 1031 0.0052879999 5.129...e-06 c-end-of-current-token 1207 0.0048019999 3.978...e-06 c-state-balance-parens-backwards 202 0.00426 2.108...e-05 c-most-enclosing-brace 1789 0.0022139999 1.237...e-06 c-renarrow-state-cache 10 0.0010699999 0.0001069999 c-state-mark-point-min-literal 10 0.001004 0.0001003999 c-forward-single-comment 37 0.0004699999 1.270...e-05 c-at-toplevel-p 2 0.00028 0.00014 c-forward-to-cpp-define-body 8 8.099...e-05 1.012...e-05 c-search-uplist-for-classkey 2 1.2e-05 6e-06 c-leave-cc-mode-mode 3 4.999...e-06 1.666...e-06