I have two installations of DokuWiki that appear to be the same on very similar servers. On one the pages come up instantly, but on the other they take a long time to come up. I have put in some code to print the timing of various stages, and what I have found is strange.
In "doku.php" I have:
...
$start_time = microtime(true);
//do the work
act_dispatch($ACT);
...
In "actions.php" I have:
...
function act_dispatch(){
$go_time = microtime(true);
...
And at the bottom of the template I have:
<div class="no"><?php tpl_indexerWebBug()?></div>
<p>Generated in <?php print microtime(true) - $start_time; ?> seconds at <?php print date('Ymd.His', time()); ?></p>
<p>Go time <?php print microtime(true) - $go_time; ?> seconds</p>
The output I get is like this:
Generated in 0.748002 seconds at 20070302.154431
Go time 0.034441 seconds
Consistently the time calling act_dispatch and the first line of act_dispatch being executed is around 20 times the time taken for the rest of the script to execute.