[pmwiki-devel] PageStore with groups in subdirectories
Petko Yotov
5ko at 5ko.fr
Sun Jan 11 06:48:32 CST 2015
You should never need to modify pmwiki.php or other core files, mostly
everything can be redefined or replaced in config.php or with recipes.
This way you can upgrade without losing your functions or having to
re-apply your changes.
Here, simply define the $WikiDir variable in config.php.
See also :
http://www.pmwiki.org/wiki/Cookbook/PerGroupSubDirectories
Petko
On 2015-01-11 13:25, Omar Cornut wrote:
> Hello again,
>
> While measuring processing cost I went looking into PageStore::ls().
> We have a wiki.d/ directory with 20000 files and this function cost us
> a fair amount of time, and called multiple times by our fancy pages.
>
> So I was considering creating subdirectories inside wiki.d/ for each
> group to benefit of OS file system indexing + shave off a lot of the
> processing on PHP side.
>
> Then I noticed that PageStore via pagefile() appears to support this
> already. If we changed:
>
> $WikiDir = new PageStore('wiki.d/{$FullName}');
>
> to
>
> $WikiDir = new PageStore('wiki.d/{$Group}/{$FullName}');
>
> However this is not exposed as an option and requires modifying
> pmwiki.php
> I was wondering if that change would be safe and if you can think or
> bugs or side-effects of performing the change (and adjusting our file
> structure accordingly).
More information about the pmwiki-devel
mailing list