[dokuwiki] Re: Reflexion on metafiles

  • From: Christopher Smith <chris@xxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Wed, 31 Mar 2010 15:25:33 +0100

On 31 Mar 2010, at 15:17, Michael Klier wrote:

> On Wed, Mar 31, 2010 at 03:34:40PM +0200, YoBoY wrote:
>> After some tests, it appears that the glob function give us a constant  
>> 50% improvement in speed, no real memory difference and a similar  
>> quantity of disk access.
>> 
>> A mechanism based on file_exists could give a better speed improvement  
>> with a constant time response (more than 90% on a small directory) and  
>> not depending on the number of files in the directories.
>> 
>> Without considering my particular case of use on a nfs file system with  
>> a meta directory containing more than 12000 files, passing to a glob is  
>> a good choice. But we can do a better job by controlling exactly what we  
>> want to delete without scanning an entire directory to find these files.
> 
> I see. One sulution I could imagine would be to have a list of known metafiles
> and allow plugins to register their own types via an action event
> METAFILE_REGISTER which would be triggered in in metaFiles() maybe. But on the
> other hand, that sounds like a bit too much too me.
> 

Any solution that relies on the plugin being present and active would fail to 
remove meta files for removed/disabled plugins.

But rather than an event.  I think adding a standard config value that could be 
used to list any metafiles extensions the plugin uses.  This has the advantage 
of being a passive listing, ie. its not being created on every DokuWiki page 
view, when it would be used very rarely.

- Chris

Other related posts: