From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: Slow Info startup Date: Tue, 29 Nov 2005 21:38:05 -0500 Message-ID: <878xv6zwqa.fsf@stupidchicken.com> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-Trace: sea.gmane.org 1133318300 11135 80.91.229.2 (30 Nov 2005 02:38:20 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 30 Nov 2005 02:38:20 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 30 03:38:19 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EhHqZ-0001ko-Ol for ged-emacs-devel@m.gmane.org; Wed, 30 Nov 2005 03:37:28 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EhHqY-0005JJ-WD for ged-emacs-devel@m.gmane.org; Tue, 29 Nov 2005 21:37:27 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EhHqO-0005J6-Tw for emacs-devel@gnu.org; Tue, 29 Nov 2005 21:37:17 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EhHqO-0005Iu-Eb for emacs-devel@gnu.org; Tue, 29 Nov 2005 21:37:16 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EhHqO-0005Ir-Az for emacs-devel@gnu.org; Tue, 29 Nov 2005 21:37:16 -0500 Original-Received: from [18.19.6.82] (helo=localhost.localdomain) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EhHqO-00052Q-Dn for emacs-devel@gnu.org; Tue, 29 Nov 2005 21:37:16 -0500 Original-Received: by localhost.localdomain (Postfix, from userid 1000) id 75FD51208AF; Tue, 29 Nov 2005 21:38:12 -0500 (EST) Original-To: Katsumi Yamaoka In-Reply-To: (Katsumi Yamaoka's message of "Wed, 30 Nov 2005 10:40:36 +0900") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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:46791 Archived-At: Katsumi Yamaoka writes: > I have several Info directories specified to Info-directory-list > and there are a lot of entries in those dir files. Recently, I > found it takes a long time to start up Info. It is caused by > the change of Info-fontify-node made at 2005-11-25. Is there a > way to make it fast besides reducing Info-directory-list? The change was to correctly fontify Info buffers opened with Info-on-current-buffer. If we are willing to sacrifice a little correctness, there is one change that can speed things up. See the attached patch. The side-effect of this is that Info will fontify incorrectly in one corner case. This happens when you call Info-on-current-buffer on a file named (e.g.) "elisp" outside of Info-directory list, or a non-file buffer named "elisp". When you browse around, your Info history will be recorded as though you are visiting the real "elisp" info file, at /usr/share/info/elisp or wherever. If you later visit the "real" info file, those links will be fontified as "previously visited" links. Maybe that's an acceptable situation, however. *** emacs/lisp/info.el.~1.463.~ 2005-11-29 15:07:25.000000000 -0500 --- emacs/lisp/info.el 2005-11-29 21:22:28.000000000 -0500 *************** *** 3800,3816 **** (and (not (equal (match-string 4) "")) (match-string 4)) (match-string 2))))) ! (file Info-current-file) (hl Info-history-list) res) (if (string-match "(\\([^)]+\\))\\([^)]*\\)" node) ! (setq file (Info-find-file (match-string 1 node) t) node (if (equal (match-string 2 node) "") "Top" (match-string 2 node)))) (while hl (if (and (string-equal node (nth 1 (car hl))) ! (string-equal file (nth 0 (car hl)))) (setq res (car hl) hl nil) (setq hl (cdr hl)))) res))) 'info-xref-visited 'info-xref)) --- 3800,3817 ---- (and (not (equal (match-string 4) "")) (match-string 4)) (match-string 2))))) ! (file (file-name-nondirectory Info-current-file)) (hl Info-history-list) res) (if (string-match "(\\([^)]+\\))\\([^)]*\\)" node) ! (setq file (match-string 1 node) node (if (equal (match-string 2 node) "") "Top" (match-string 2 node)))) (while hl (if (and (string-equal node (nth 1 (car hl))) ! (string-equal file (file-name-nondirectory ! (nth 0 (car hl))))) (setq res (car hl) hl nil) (setq hl (cdr hl)))) res))) 'info-xref-visited 'info-xref)) *************** *** 3905,3921 **** (let ((node (if (equal (match-string 3) "") (match-string 1) (match-string 3))) ! (file Info-current-file) (hl Info-history-list) res) (if (string-match "(\\([^)]+\\))\\([^)]*\\)" node) ! (setq file (Info-find-file (match-string 1 node) t) ! node (if (equal (match-string 2 node) "") "Top" (match-string 2 node)))) (while hl (if (and (string-equal node (nth 1 (car hl))) ! (string-equal file (nth 0 (car hl)))) (setq res (car hl) hl nil) (setq hl (cdr hl)))) res))) 'info-xref-visited 'info-xref))) --- 3906,3923 ---- (let ((node (if (equal (match-string 3) "") (match-string 1) (match-string 3))) ! (file (file-name-nondirectory Info-current-file)) (hl Info-history-list) res) (if (string-match "(\\([^)]+\\))\\([^)]*\\)" node) ! (setq file (match-string 1 node) ! node (if (equal (match-string 2 node) "") "Top" (match-string 2 node)))) (while hl (if (and (string-equal node (nth 1 (car hl))) ! (string-equal file (file-name-nondirectory ! (nth 0 (car hl))))) (setq res (car hl) hl nil) (setq hl (cdr hl)))) res))) 'info-xref-visited 'info-xref)))