[dokuwiki] Re: Changelog rewrite

  • From: Andreas Gohr <andi@xxxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Fri, 28 Jul 2006 21:12:54 +0200

Ben Coburn wrote:

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.

This is not completely true anymore. If I remember correctly the changlog isn't read completely anymore but instead in chunks backwards. So memory usage shouldn't be the problem.


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'.

I'm not sure this is really necessary. Most accesses to the changleog need either only the last edit info (should be stored in metadata) or the last few lines from the complete log (recent changes). So these accesses aren't a problem, but the latter case would be much more complicated with splitted changelogs.


To improve the search through the changelog for a special revison I'd suggested to implement a binary search some time ago. Because the changelog is sorted by date searching using this method should be quite fast.

However I'd like to hear other's ideas.

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

Other related posts: