Topic on Extension talk:LinkTitles

Time execution issue on $wgLinkTitlesParseOnEdit = true;

3
Willyedoo (talkcontribs)

Hello,

When editing "heavy page" am getting this error :

"Fatal error: Maximum execution time of 30 seconds exceeded in /var/www/wiki/extensions/LinkTitles/includes/Splitter.php on line 88"

When i change $wgLinkTitlesParseOnEdit = true; to $wgLinkTitlesParseOnEdit = false;, the error disappear.

A look to the file /LinkTitles/includes/Splitter.php lead to this fucntion "return preg_split( $this->splitter, $text, -1, PREG_SPLIT_DELIM_CAPTURE );"

Any idea how to improve the time execution?

Thanks!

Bovender (talkcontribs)

There's no quick'n'easy way to improve this, unfortunately. The regex splitting is an expensive operation. Workarounds: Increase the execution time limit in php.ini, or consider splitting the page into several pages. I guess that's what you didn't hope to hear...

70.160.223.43 (talkcontribs)

I believe commands ran from the command line don't face time limit restrictions. You might want to try running the script from there.

Reply to "Time execution issue on $wgLinkTitlesParseOnEdit = true;"