Here is my parsing log with your data—running PHP 5.2 and MySQL 5.1
(0.037215) Calling Class/Method: Wiki/wiki
(0.037379) -> Class Called: Wiki
(0.170781) Line 1531 just created URL about to set up data array
(0.171227) Line 1544 done with array and setting up article
(0.230231) Line 1531 just created URL about to set up data array
(0.230657) Line 1544 done with array and setting up article
(0.246516) Line 1531 just created URL about to set up data array
(0.246915) Line 1544 done with array and setting up article
(0.264982) Line 1531 just created URL about to set up data array
(0.265376) Line 1544 done with array and setting up article
(0.377995) Line 1531 just created URL about to set up data array
(0.378483) Line 1544 done with array and setting up article
(0.464824) Line 1531 just created URL about to set up data array
(0.465311) Line 1544 done with array and setting up article
(0.471461) Line 1531 just created URL about to set up data array
(0.471949) Line 1544 done with array and setting up article
(0.480240) Line 1531 just created URL about to set up data array
(0.480723) Line 1544 done with array and setting up article
(0.483291) Line 1531 just created URL about to set up data array
(0.483730) Line 1544 done with array and setting up article
(0.486787) Line 1531 just created URL about to set up data array
(0.487230) Line 1544 done with array and setting up article
(0.490830) Line 1531 just created URL about to set up data array
(0.491273) Line 1544 done with array and setting up article
(0.495613) Line 1531 just created URL about to set up data array
(0.496066) Line 1544 done with array and setting up article
(0.498935) Line 1531 just created URL about to set up data array
(0.499379) Line 1544 done with array and setting up article
(0.501737) Line 1531 just created URL about to set up data array
(0.502179) Line 1544 done with array and setting up article
(0.504655) Line 1531 just created URL about to set up data array
(0.505095) Line 1544 done with array and setting up article
(0.507978) Line 1531 just created URL about to set up data array
(0.508469) Line 1544 done with array and setting up article
(0.512678) Line 1531 just created URL about to set up data array
(0.513135) Line 1544 done with array and setting up article
(0.519074) Line 1531 just created URL about to set up data array
(0.519547) Line 1544 done with array and setting up article
(0.522341) Line 1531 just created URL about to set up data array
(0.522785) Line 1544 done with array and setting up article
(0.525489) Line 1531 just created URL about to set up data array
(0.525961) Line 1544 done with array and setting up article
(0.548163) -> Method Called: wiki
(0.548196) -> Data Returned
I used your debugging message so it would be easy to compare. On the same articles, you can see that it is taking longer to parse certain articles, only on your server, it’s taking an inordinate amount of time. An extra .04 seconds on mine vs. 21 full seconds on yours, for instance.
What I want you to do now is to start reducing processing until the speed is alleviated as follows. This would be very quick to debug if I could have access to the server, but since that’s not the case, you’re going to need to have some patience so we can narrow this down to the exact function and statement choking things.
On line 1545, start with:
$data['{article}'] = $this->convert_curly_brackets($TYPE->parse_type( $this->wiki_syntax($row['page_content']),
array(
'text_format' => $this->text_format,
'html_format' => $this->html_format,
'auto_links' => $this->auto_links,
'allow_img_url' => 'y'
)
));
Then:
$data['{article}'] = $this->convert_curly_brackets($TYPE->parse_type( $row['page_content'],
array(
'text_format' => $this->text_format,
'html_format' => $this->html_format,
'auto_links' => $this->auto_links,
'allow_img_url' => 'y'
)
));
Then:
$data['{article}'] = $this->convert_curly_brackets($row['page_content']);
And report back on the affected time for parsing that each modification had. Then we’ll drill down further.