[pmwiki-users] Pagelists Performance

Patrick R. Michaud pmichaud at pobox.com
Fri Dec 1 16:34:30 CST 2006


On Fri, Dec 01, 2006 at 08:12:31PM +0000, Scott wrote:
> Thanks for the response.
> 
> Oops, I looked at my pagelist and it's actually (:pagelist count=10
> fmt=#simplename order=random:). Just wanted to display a random set of pages
> for the users to see on the main page. Originally, I was thinking that the
> last ten pages that were updated might be a nice pagelist, but decided on the
> random instead.

Oh, if that's the case, you might get a huge performance increase
by doing the following instead:

  (:pagelist trail=Site.AllRecentChanges fmt=#simplename order=random count=10)

Thus, instead of scanning the entire wiki.d/ directory for
pagenames, it can simply read Site.AllRecentChanges and
grab pagenames from there.  It'll randomly sort that list
and display the first ten.

Pm




More information about the pmwiki-users mailing list