On Friday 04 September 2009 09:17:38 Eemeli Aro wrote:
> 2009/9/4 Hans <[email protected]>:
> > 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.

Yes, and I changed the Cookbook page to display the optimized strings where it 
was possible.

This speed optimization to calculate the filename concerns only the default 
wiki.d and wikilib.d directories, as well as the 'wiki.d/{$Group}/{$FullName}' 
customization (in a function named 'pagefile'). On other PageStore directories 
from skins, etc., there is no difference.

Thanks,
Petko


_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Reply via email to