From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: Why doesn't Info `T' cache node tree for current file? Date: Tue, 10 Jun 2008 11:09:20 -0700 Message-ID: <004201c8cb25$1b2be870$0200a8c0@us.oracle.com> References: <004001c8cb1b$69006c10$0200a8c0@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1213121504 27317 80.91.229.12 (10 Jun 2008 18:11:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 10 Jun 2008 18:11:44 +0000 (UTC) Cc: emacs-devel@gnu.org To: "'Eli Zaretskii'" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jun 10 20:12:27 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1K68KR-0003uJ-Rg for ged-emacs-devel@m.gmane.org; Tue, 10 Jun 2008 20:12:20 +0200 Original-Received: from localhost ([127.0.0.1]:42371 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K68Je-0001GH-16 for ged-emacs-devel@m.gmane.org; Tue, 10 Jun 2008 14:11:30 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K68JW-0001Ei-6Z for emacs-devel@gnu.org; Tue, 10 Jun 2008 14:11:22 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K68JR-0001CW-S0 for emacs-devel@gnu.org; Tue, 10 Jun 2008 14:11:19 -0400 Original-Received: from [199.232.76.173] (port=49139 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K68JR-0001CT-OG for emacs-devel@gnu.org; Tue, 10 Jun 2008 14:11:17 -0400 Original-Received: from agminet01.oracle.com ([141.146.126.228]:52522) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1K68JL-0001ZB-OX; Tue, 10 Jun 2008 14:11:12 -0400 Original-Received: from agmgw2.us.oracle.com (agmgw2.us.oracle.com [152.68.180.213]) by agminet01.oracle.com (Switch-3.2.4/Switch-3.1.7) with ESMTP id m5AIB8NH002518; Tue, 10 Jun 2008 13:11:08 -0500 Original-Received: from acsmt351.oracle.com (acsmt351.oracle.com [141.146.40.151]) by agmgw2.us.oracle.com (Switch-3.2.0/Switch-3.2.0) with ESMTP id m5AGtkok023093; Tue, 10 Jun 2008 12:11:07 -0600 Original-Received: from inet-141-146-46-1.oracle.com by acsmt351.oracle.com with ESMTP id 3690100231213121361; Tue, 10 Jun 2008 11:09:21 -0700 Original-Received: from dradamslap1 (/24.5.171.3) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 10 Jun 2008 11:09:21 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: AcjLIvIIAIm0j9TQRo2TvWbKpZwNaAAAMM2A X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 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:98877 Archived-At: > > I understand that the TOC built depends on the current Info > > file, but I'm wondering why the node list (tree) for a given > > Info file isn't kept around, to avoid rebuilding it each > > time a user hits `T'. > > AFAIK, Info doesn't maintain the node structure (it doesn't need to be > a tree, btw, it could be a graph) in memory at all. It doesn't need > to, except for Info-toc. So if you are suggesting that the results of > Info-toc should be stashed away waiting for the user to invoke > Info-toc again for the same Info file, then maybe we should do it; Yes, that's what I was thinking of. But I was just wondering why it isn't done. "Could", not "should". > otherwise, generating the node graph just so TOC would be created > faster is IMO not a good idea. Right. No, I was thinking of the former - to avoid rebuilding. > Btw, I can understand why whoever wrote Info-toc didn't save the > resulting buffer: Info always throws away the (sub-)file when it > switches to another, and *toc* is treated the same way. So it fits > better into the overall code structure, whereby a file is visited (in > this case, generated out of thin air), displayed, then its buffer > discarded. I was thinking more of saving the node list (result of Info-build-toc) than the buffer. It could be discarded when you visit another Info file, instead of immediately. Actually, `T' seems to create the TOC buffer quite quickly. I'm a bit surprised, when I look at the code. It seems like it would not be so quick.