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: Slow Info startup Date: Thu, 01 Dec 2005 23:47:54 +0200 Organization: JURTA Message-ID: <878xv4h4l1.fsf@jurta.org> References: <878xv6zwqa.fsf@stupidchicken.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1133473989 8046 80.91.229.2 (1 Dec 2005 21:53:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 1 Dec 2005 21:53:09 +0000 (UTC) Cc: cyd@stupidchicken.com, yamaoka@jpl.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 01 22:53:00 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EhwKl-00031q-LF for ged-emacs-devel@m.gmane.org; Thu, 01 Dec 2005 22:51:31 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EhwKU-0006rT-Hc for ged-emacs-devel@m.gmane.org; Thu, 01 Dec 2005 16:51:02 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EhwK3-0006p4-50 for emacs-devel@gnu.org; Thu, 01 Dec 2005 16:50:35 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EhwJk-0006lK-7g for emacs-devel@gnu.org; Thu, 01 Dec 2005 16:50:34 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EhwJk-0006lH-3w for emacs-devel@gnu.org; Thu, 01 Dec 2005 16:50:16 -0500 Original-Received: from [194.126.101.111] (helo=mail.neti.ee) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EhwJg-0002dM-16; Thu, 01 Dec 2005 16:50:12 -0500 Original-Received: from mail.neti.ee (80-235-43-77-dsl.mus.estpak.ee [80.235.43.77]) by Relayhost1.neti.ee (Postfix) with ESMTP id A8B2F20E6; Thu, 1 Dec 2005 23:49:59 +0200 (EET) Original-To: rms@gnu.org In-Reply-To: (Richard M. Stallman's message of "Thu, 01 Dec 2005 01:05:23 -0500") 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:46858 Archived-At: > 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. > > Maybe it is acceptable, but first, could you explain why you think > this is the best solution? > > Why is removing the directory related to making this code faster? The Info history contains absolute file names. Menu items and cross-references contain only file names without directory part. Info uses the history to decide how to fontify visited references: if the file name (and node name) of a menu item or cross-reference exists in the history then it is fontified with `info-xref-visited'. The old code uses `file-name-nondirectory' to remove directory part from absolute file names in the history before comparing them to the name extracted from a menu item or cross-reference. The new code uses `Info-find-file' to find the absolute file name of a menu item or cross-reference before comparing it to absolute file names in the history. `Info-find-file' is a quadratically slow function that iterates over `Info-directory-list' and `Info-suffix-list' to find the absolute Info file name. The `dir' node usually contains hundreds of menu items with non-absolute file names in parens, so `Info-find-file' gets called on each of them during fontification in the new code. -- Juri Linkov http://www.jurta.org/emacs/