Zim

Comment 16 for bug 380844

Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote : Re: [Bug 380844] Re: Link to anchors within pages

On Sun, Jun 26, 2011 at 11:39 PM, Oliver Joos <email address hidden>wrote:

> Jaap Karssenberg wrote:
> > But if we keep all explicit anchors in an index table, why not implicit
> anchors as well ?
>
> Do you mean an internal index table of anchor targets? Keeping this
> always consistent sounds difficult and would not help to find matching
> headings much faster for average page sizes, does it?
>

I mean a table in the sqlite database we use to keep the index. It will
definitely improve lookup time as you don't have to read and parse wiki text
every time you want to know the headings in another page. Maintaining it is
not more difficult than maintaining the tables with links and tags, what we
already do.

Especially when you want to highlight links to non-existing anchors it
becomes important to have such an index table. For example you load a page
that has links to 5 other pages, without the table you now have to read and
parse 5 more pages, in contrast to doing 5 sql queries on a medium size
database, file access is usually slow.

But I leave it to the implementer to determine the performance and check for
bottlenecks. Just trying to think ahead what may become limiting.

-- Jaap