emacs-devel
[Top][All Lists]
Advanced

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

RE: breadcrumbs for Info . . . . . .


From: Drew Adams
Subject: RE: breadcrumbs for Info . . . . . .
Date: Tue, 10 Jun 2008 20:18:02 -0700

> This is a nice feature, but I think its implementation is too heavy:
> to display just one node it has to visit several other nodes. 
> It would be more optimal to build a tree of all Info nodes after
> visiting the first node and to use this cached structure during
> displaying an Info node.

Now you know why I sent the mail about `T' and TOC. ;-) That was the first
approach I thought of: use something similar to the node tree built for `T'.

However, I don't think that the current breadcrumbs approach is a problem or
that the other (TOC) approach would be better. Why? Because most manuals are not
deep. I picked the deepest node I found in the Emacs manual (by looking at the
TOC) as the example I sent. And I see no performance problem with that depth.

We have only a certain number of possible heading levels, and it works fine for
those, AFAICT. Remember, breadcrumbs reflect document structure, not
chronological visits (as they always should). They are not meant to duplicate
the Back button (`l').

Do you actually see a performance problem (recipe)?

On the other hand, the implementation naively visits each ancestor node, using
`Info-goto-node'. Very naive. There is no need to do everything that
`Info-goto-node' does, just to pick up the Up node names! That could be
optimized. I don't feel like working on that, myself, but if someone wants to,
go for it.

The current approach is very simple - and AFAICT it is fast enough. If you find
that it is not, there should be plenty of room for optimization in the current
approach.

If that would still not be fast enough, then we could look at using a node tree
approach. However, should we then automatically precompute the node tree for the
whole manual (or perhaps whole subfile), or just build pieces of it as needed
(e.g. via breadcrumbs for visited subfiles)?

Wrt the other thread (`T' and TOC), unless there is some other reason (e.g.
breadcrumbs, other things...), there is no need to prebuild the TOC. Better to
wait until the user hits `T'. Of course, once it's built, it could be used for
other things.






reply via email to

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