[dokuwiki] Changelog rewrite (was: New release and DokuWiki efficiency improvements...)

  • From: Ben Coburn <btcoburn@xxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Fri, 28 Jul 2006 10:32:32 -0700


On Jul 26, 2006, at 11:12 AM, Andreas Gohr wrote:

On Wed, 26 Jul 2006 12:31:24 +0100
Chris Smith <chris@xxxxxxxxxxxxx> wrote:

Hi,

In the light of the upcoming release I am going to try to find time to
do some profiling of DokuWiki with xdebug looking for bottlenecks and
speed improvements.

great :-)

I think main bottlenecks are all places which need to extract certain
info from the changelog for metadata. All those occurences should be
ideally replaced with reading info from the new metadata renderer, also
image and backlink references could probably be improved by using
metadata.


If no one is working on the changelog code yet, I will follow through with the suggestion that I posted back in May.


See //www.freelists.org/archives/dokuwiki/05-2006/msg00483.html
The main problem is that all the changelog items are stored in one monolithic file. This file gets loaded into memory (and split into lines) by PHP, at least once every page access. As 'changes.log' grows without bound I suspect it will eventually clobber PHP.

The approach I would suggest is to keep one changelog file for each wiki page. These files could be kept under the 'data/meta/' directory as '<id>.changes'. There also needs to be a function for quickly loading the last line without reading the whole file into memory. The global changes file could be kept as 'data/meta/_dokuwiki.changes', however it should only store enough changes to quickly render the RSS feed and 'Recent Changes' page.

This will make the changelog system scale well on large wikis. I will also look into caching the (data from the) last line of each page's changelog file in the page's meta file as Andi has suggested.


If this code is already being worked on, or anyone has suggestions for the design of the changelog system please speak up now.

Regards, Ben Coburn


------------------- silicodon.net -------------------

--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts:

  • » [dokuwiki] Changelog rewrite (was: New release and DokuWiki efficiency improvements...)