From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Info is slow in Emacs 22.0.50 Date: Sun, 12 Jun 2005 02:18:47 +0300 Organization: JURTA Message-ID: <87psusmk0u.fsf@jurta.org> References: <17066.8682.499211.504174@farnswood.snap.net.nz> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1118541450 8052 80.91.229.2 (12 Jun 2005 01:57:30 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 12 Jun 2005 01:57:30 +0000 (UTC) Cc: nickrob@snap.net.nz, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 12 03:57:20 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DhHir-0000qB-EZ for ged-emacs-devel@m.gmane.org; Sun, 12 Jun 2005 03:57:13 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DhHnM-0007to-09 for ged-emacs-devel@m.gmane.org; Sat, 11 Jun 2005 22:01:52 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DhHmR-0007Zl-HR for emacs-devel@gnu.org; Sat, 11 Jun 2005 22:00:55 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DhHmM-0007Wf-7j for emacs-devel@gnu.org; Sat, 11 Jun 2005 22:00:51 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DhHmM-0007Uy-50 for emacs-devel@gnu.org; Sat, 11 Jun 2005 22:00:50 -0400 Original-Received: from [194.126.101.116] (helo=HOT-Bounce1.hot.ee) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DhHiW-0006O6-TP; Sat, 11 Jun 2005 21:56:53 -0400 Original-Received: from mail.neti.ee (Relay5 [192.168.1.24]) by HOT-Bounce1.hot.ee (Postfix) with ESMTP id 0EE1413D424; Sun, 12 Jun 2005 04:39:03 +0300 (EEST) Original-Received: from mail.neti.ee (80-235-33-16-dsl.mus.estpak.ee [80.235.33.16]) by Relayhost1.neti.ee (Postfix) with ESMTP id 0C00C1BE8; Sun, 12 Jun 2005 04:51:04 +0300 (EEST) Original-To: Eli Zaretskii In-Reply-To: (Eli Zaretskii's message of "Sat, 11 Jun 2005 15:52:21 +0300") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) X-Virus-Scanned: by amavisd-new-2.2.1 (20041222) (Debian) at neti.ee 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:38613 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:38613 > Can you profile info.el with elp.el and show here what were the > hotspots? That could give a clue about where to look for the reasons > for the slowdown. In Emacs started with -Q -D I see no slowdown at all. But with full .emacs loaded and Emacs desktop restored I observe a noticeable slowdown even on 1GHz PC, when visiting Info nodes with large menus. So I also could look for the reasons for the slowdown. I profiled info.el with elp.el and got the following results for visiting the node (info "(elisp)Top") from the Directory node: In Emacs started with `emacs -Q -D': Function Name Call Count Elapsed Time Average Time ================================ ========== ============ ============ Info-follow-nearest-node 1 0.647439 0.647439 Info-try-follow-nearest-node 1 0.647387 0.647387 Info-goto-node 1 0.645898 0.645898 Info-find-node 1 0.645779 0.645779 Info-find-node-2 1 0.642741 0.642741 Info-select-node 1 0.61038 0.61038 Info-fontify-node 1 0.606797 0.606797 re-search-forward 730 0.1290569999 0.0001767904 add-text-properties 1266 0.1187029999 9.376...e-05 info-insert-file-contents 2 0.0292629999 0.0146314999 Info-read-subfile 1 0.026425 0.026425 match-string 1908 0.0107000000 5.607...e-06 put-text-property 1559 0.0106910000 6.857...e-06 looking-at 1409 0.0063000000 4.471...e-06 Info-find-file 1 0.002987 0.002987 info-file-exists-p 49 0.0021950000 4.479...e-05 Info-index-node 3 0.001246 0.0004153333 Info-get-token 4 0.000875 0.00021875 Info-display-images-node 1 0.000757 0.000757 Info-hide-cookies-node 1 0.000731 0.000731 Info-find-node-in-buffer 1 0.00027 0.00027 Info-find-node-in-buffer-1 1 0.000249 0.000249 Info-find-in-tag-table 1 0.000229 0.000229 info-insert-file-contents-1 47 0.0002099999 4.468...e-06 Info-find-in-tag-table-1 2 0.000202 0.000101 Info-extract-menu-node-name 1 0.000171 0.000171 Info-set-mode-line 1 0.000141 0.000141 Info-escape-percent 1 9.5e-05 9.5e-05 Info-following-node-name-re 1 1.3e-05 1.3e-05 Info-node-at-bob-matching 1 7e-06 7e-06 info-initialize 2 6e-06 3e-06 With loaded .emacs and Info-fontify-maximum-menu-size = 100000: Function Name Call Count Elapsed Time Average Time ================================ ========== ============ ============ Info-follow-nearest-node 1 18.451064 18.451064 Info-try-follow-nearest-node 1 18.450906 18.450906 Info-goto-node 1 18.449308 18.449308 Info-find-node 1 18.449179 18.449179 Info-find-node-2 1 18.431969 18.431969 Info-select-node 1 18.39279 18.39279 Info-fontify-node 1 18.388963 18.388963 put-text-property 1559 5.4653120000 0.0035056523 re-search-forward 730 0.0564030000 7.726...e-05 info-insert-file-contents 2 0.0362220000 0.0181110000 Info-read-subfile 1 0.028904 0.028904 match-string 1908 0.0194390000 1.018...e-05 Info-find-file 1 0.017144 0.017144 add-text-properties 1266 0.0143140000 1.130...e-05 match-end 5447 0.0123990000 2.276...e-06 info-file-exists-p 145 0.0105809999 7.297...e-05 looking-at 1409 0.0097819999 6.942...e-06 match-beginning 3356 0.0080770000 2.406...e-06 Info-index-node 3 0.005018 0.0016726666 Info-display-images-node 1 0.001014 0.001014 Info-hide-cookies-node 1 0.000979 0.000979 Info-get-token 4 0.0009629999 0.0002407499 info-insert-file-contents-1 143 0.0006999999 4.895...e-06 Info-find-node-in-buffer 1 0.000264 0.000264 Info-find-node-in-buffer-1 1 0.000241 0.000241 Info-find-in-tag-table 1 0.000229 0.000229 Info-find-in-tag-table-1 2 0.0001999999 9.999...e-05 Info-extract-menu-node-name 1 0.00019 0.00019 Info-set-mode-line 1 0.000182 0.000182 Info-escape-percent 1 9.8e-05 9.8e-05 replace-regexp-in-string 1 6e-05 6e-05 Info-following-node-name-re 1 1.3e-05 1.3e-05 Info-node-at-bob-matching 1 9e-06 9e-06 info-initialize 2 6e-06 3e-06 With loaded .emacs and Info-fontify-maximum-menu-size = 0: Function Name Call Count Elapsed Time Average Time ================================ ========== ============ ============ Info-follow-nearest-node 1 0.060599 0.060599 Info-try-follow-nearest-node 1 0.060563 0.060563 Info-goto-node 1 0.058121 0.058121 Info-find-node 1 0.057991 0.057991 Info-find-node-2 1 0.046453 0.046453 info-insert-file-contents 2 0.027276 0.013638 Info-read-subfile 1 0.024617 0.024617 re-search-forward 96 0.0177140000 0.0001845208 Info-select-node 1 0.0177 0.0177 Info-fontify-node 1 0.014428 0.014428 Info-find-file 1 0.011469 0.011469 info-file-exists-p 145 0.008243 5.684...e-05 Info-get-token 4 0.001839 0.00045975 looking-at 44 0.0013139999 2.986...e-05 Info-index-node 3 0.001055 0.0003516666 put-text-property 92 0.0008159999 8.869...e-06 Info-display-images-node 1 0.000754 0.000754 Info-hide-cookies-node 1 0.00073 0.00073 info-insert-file-contents-1 143 0.0006709999 4.692...e-06 Info-find-node-in-buffer 1 0.000286 0.000286 Info-find-node-in-buffer-1 1 0.000263 0.000263 Info-find-in-tag-table 1 0.000231 0.000231 Info-find-in-tag-table-1 2 0.000202 0.000101 match-beginning 86 0.0001779999 2.069...e-06 Info-extract-menu-node-name 1 0.000159 0.000159 match-end 86 0.0001589999 1.848...e-06 Info-set-mode-line 1 0.000126 0.000126 Info-escape-percent 1 0.000121 0.000121 match-string 9 6.6e-05 7.333...e-06 replace-regexp-in-string 1 4.2e-05 4.2e-05 Info-following-node-name-re 1 1.2e-05 1.2e-05 Info-node-at-bob-matching 1 1e-05 1e-05 info-initialize 2 8.000...e-06 4.000...e-06 These results indicate that the main source of the slowdown is the menu items fontification code in `Info-fontify-node', and it is caused by a large amount of Info menu items needed to be processed. -- Juri Linkov http://www.jurta.org/emacs/