From: Reini Urban <rurban@x-...> - 2004-11-09 17:34:43
I cleaned up WikiDB internal code now a lot:
* revert to the wikidb ref passing. there's no memory abuse there.
* use new wikidb->_cache->_id_cache instead of wikidb->_iwpcache, to
effectively store page ids (only existing pages!)
in the getPageLinks (GleanDescription) step, and all other iterators
which use all existing pages,
those are also needed at the rendering for linkExistingWikiWord().
* use this _id_cache also for _get_pageid()
This saves typically 8-10 SELECT's per page (i.e. one for each
* new options argument to pageiterator. for the caching.
* fix passing of all page fields to the pageiterator. this was broken.
* fix overlarge session data which got broken with the latest
This improves the mysql backend a lot.
There's no locking anymore on simple browse, and reduces the numnber of
queries from typically 25 to 15 per page view.
Without pageperms (may view, author of page, owner of page, ...) and
without GROUP_METHOD=WIKIPAGE, there are about 10 less queries,
say it reaches almost optimality.
Most simple updates are also atomic yet, which also reduces the need to
lock (which really is locking all tables on mysql, even from browse).
I also fixed bogo login without password, without the intermediate login
page for the default setup. This got annoying.
All tests run through and there's no memory problem anymore,
but I have to recheck on more platforms and php version.
Maybe I can also get dba working again on php < 4.2, that's my ultimate
And then I check a setup with ~1.000.000 pages and compare that to
At http://phpwiki.org/PhpMemoryExhausted/Testresults are new images from
the profiler, comparing dba (22%) to mysql (using 65% of all time).
I also added some basic profiler numbers to the relevant code sections.
(how expensive is this and that...)
What other major problems are missing?
* check auth, esp. httpauth,
* check edit (basic features, preformance and jsscript),
* add spam blocking and abuse. (that's why I added sql logging)
* re-enable block splitting in old markup. (which crashed)