1 Oct 20:25
xhtml processing optimisation.
Michiel Kamermans <pomax <at> nihongoresources.com>
2009-10-01 18:25:10 GMT
2009-10-01 18:25:10 GMT
Hi all, I'm running a few plugins on a dokuwiki now which all function as xhtml postprocessor, but running the entire page several times through several plugins does slow things down significantly. One option of course is to combine the plugins into a single monster plugin, to speed things up, but that would be a bit drastic. Has anyone every run to this problem before and solved it in a more civilised manner? Perhaps throwing a few ideas around on how to streamline multiple plugins operating on the same data would yield some usable interesting idea. I was thinking perhaps a new event that is thrown for every finalised xhtml line, so that plugins that can do their work in-place would be able to modify the lines as they're generated. Another option might be globally accessible xhtml postprocessing container with processing objects that can be added to it, with users defining a new xhtml_postprocessing_plugin extension, which in its constructor adds their custom line processing object to the processing container, with an optional method binding that gets passed the entire xhtml array once its done, should full processing be required. in code: ------------------------------ // set up some time during dokuwiki init: $XHTML_LINE_PROCESSORS = array(); // user code residing in for instance wiki/lib/plugins/[plugin(Continue reading)
brgds Otto
RSS Feed