Hi Andi > Is "rendering" this metadata on save a good idea? After a save all > cached instructions are invalid, so to render any thing we have to go > through the whole parse->handler->render process so the time to save > will get longer... on the other hand the page rendering process then > good access the freshly created instructions and would be much faster... > so it is probably not too bad. Both is true. In the end it amounts to the same. After save the current page is shown, so re-parsing, handling and rendering is done anyway. In addition, after a save we need to set creator, date created / contributor, date modified in the metadata, so we can't avoid opening and saving the meta file after save. But you're right, the rendering could take place only when we need to get the metadata. Still, I think it's a good thing if we always know that the metadata is current. > > I'm sure metadata makes life with DokuWiki not only easier, but also > > faster. To get the first heading of an other page, we only need to > > open a small file that is up to 10 times smaller than the instruction > > list currently used. And getting the backlinks is as easy as: > > > > $meta = p_get_metadata($ID); > > $backlinks = $meta['relation']['isreferencedby']; > > Hmm to have this working you would need to call the backlink search > within the meta renderer... this would increase the time needed to for > the meta renderer a lot - probably not a good idea. A second thing > speaking against this is that backlinks are not depended on the document > it self but on all other documents - having them in the metadata of the > document wouldn't be useful at all, because these are only thrown away > when the document it self changes, not when other documents change!? It doesn't need a backlink search, but every internal link would call p_set_metadata() for that other page. That means, we would have to open as many files as there are internal links. In my test environments, time needed was still acceptable. But I will have to do further testing, so I deactivated this for now. And there's a problem you rightly point to: the deletion of outdated isreferencedby items. If some checks are still necessary, we wouldn't gain that much (only the full text search would no longer be needed). > BTW: how does this relate to Chris's meta changes? Do we keep > meta instructions in the first instruction? No. The first instruction 'meta' introduced by Chris is still there, but the meta renderer doesn't keep its information in that place. I'm not sure whether we still need the first heading in the meta instruction, since it's faster to get it from the meta file unless we have the instructions ready anyway (but this is rather the exception than the rule: mostly the content comes from the XHTML cache). I have made no changes to DokuWiki functions so far. I will make performance tests for possible replacements on monday. Hot candidates are: * p_get_first_heading($id), which could simply be a wrapper around p_get_metadata($id, 'title', true) * $desc = p_get_metadata($id, 'description abstract', true) in the feed * others? > c) a wiki entry describing all the used default metadata entries See: http://wiki.splitbrain.org/wiki:discussion:metadata http://wiki.splitbrain.org/plugin:meta Best regards -- esther -- DokuWiki mailing list - more info at http://wiki.splitbrain.org/wiki:mailinglist