emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Slow Info startup


From: Chong Yidong
Subject: Re: Slow Info startup
Date: Tue, 29 Nov 2005 21:38:05 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Katsumi Yamaoka <address@hidden> 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)))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]