[pmwiki-users] smarter PageStore::ls() parameters?

Ben Stallings Ben at InterdependentWeb.com
Mon Oct 16 11:10:03 CDT 2006

I made some encouraging progress yesterday in speeding up the
pagelisting of database information in the still-very-experimental
dataquery recipe.  By caching data in a global variable and using
ADODB's functions more wisely, I was able to reduce the number of
database queries from one per record plus one per table to two queries
total!  So that was encouraging.  The new version is at Cookbook/DataQuery.

But of course caching the entire contents of a database in a variable
raises the specter of memory overflow.  And it's still pretty slow.

So I'm wondering if Pm could take a minute to share his thoughts about
how a smarter pagelist function is likely to work in the future.  I'm
not saying it should be a top priority for core development, but if I
could prepare my recipe to work that way in advance of the core, it
would save me a lot of work.  ;-)

In particular, the PageStore::ls() method currently generates a list of
all pages in the wiki, regardless of whether group= and name=
restrictions were placed on the pagelist, and so DataStore::ls() does
the same for all records in the database.  If part of the future plan is
to pass group and name limitations to the PageStore::ls() method, I
could implement the same features in DataStore::ls() and greatly reduce
the size of the recordset that has to be cached and processed.

Thoughts, Pm?  Am I even on the right track?  Thanks in advance!  --Ben

More information about the pmwiki-users mailing list