[pmwiki-users] page stores

Eemeli Aro eemeli at gmail.com
Fri Sep 4 02:17:38 CDT 2009


2009/9/4 Hans <design5 at softflow.co.uk>:
> Petko, could you please explain the "change summary" comment you left
> on Cookbook.PerGroupSubdirectories:
>
> "PageStore is highly optimized for {$Group}/{$FullName} as opposed
> to $Group/$FullName"
>
> What is the difference? You recommend to change to the new
>  {$Group}/{$FullName} ?

Figured I might answer, since I'm quite certain this is the reason:

The PageStore class has an internal method pagefile that maps a page
name to its location on disk. This is run every time you need to read
any page, and therefore has a couple of optimizations for common
locations, such that if you're using one of a few specific strings,
the directory format string (the first parameter given to PageStore()
) doesn't need to be passed through the FmtPageName function.

One of these optimized strings is 'wiki.d/{$Group}/{$FullName}'. The
end result is exactly the same as with 'wiki.d/$Group/$FullName', just
faster.

eemeli



More information about the pmwiki-users mailing list