all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Eli Zaretskii'" <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: RE: Why doesn't Info `T' cache node tree for current file?
Date: Tue, 10 Jun 2008 13:57:18 -0700	[thread overview]
Message-ID: <009501c8cb3c$9246d110$0200a8c0@us.oracle.com> (raw)
In-Reply-To: <uhcc1javr.fsf@gnu.org>

> > > 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.
> 
> Simple: because it isn't needed.  All Info needs to move from a node
> is 3 pointers (next, prev, and up), and these are written on the
> header line of each node.  So there's no need to build any structure
> in memory at all, the information is always at Info's fingertips.

Wondering why it isn't done... for the same reason you agreed "maybe we should
do it": to save rebuilding (efficiency).

I know it's not needed for node navigation.

And, as I said, I can see that it is not in fact needed for efficiency - which
was a bit surprising to me.

> > 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.
> 
> It gets help from the detailed node listing in the Top node.

Yes, I saw that. It's still a bit surprising.

Anyway, no _need_ to do anything. My thought was that if someone uses `T', s?he
is likely to do so again, and likely with the same file. Since we have gone to
the trouble of building the node tree (graph), why not save it for possible
reuse? That's all. It was after sending that thought that I experimented some
more and saw that building the tree is quicker than I expected - and quick
enough.






  reply	other threads:[~2008-06-10 20:57 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-10 16:59 Why doesn't Info `T' cache node tree for current file? Drew Adams
2008-06-10 17:52 ` Eli Zaretskii
2008-06-10 18:09   ` Drew Adams
2008-06-10 20:25     ` Eli Zaretskii
2008-06-10 20:57       ` Drew Adams [this message]
2008-06-11  0:02         ` Juri Linkov
2008-06-11  0:55           ` Miles Bader
2008-06-11  3:18             ` Drew Adams
2008-06-11  1:16           ` Stefan Monnier
2008-06-11  3:18             ` Drew Adams
2008-06-11  3:17           ` Drew Adams
2008-06-11  9:27             ` Juri Linkov
2008-06-11 13:46               ` Drew Adams
2008-06-11 19:02                 ` Eli Zaretskii
2008-06-11  3:20           ` Eli Zaretskii
2008-06-11  3:24             ` Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='009501c8cb3c$9246d110$0200a8c0@us.oracle.com' \
    --to=drew.adams@oracle.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.