From: Brion Vibber Date: Fri, 26 Nov 2004 10:49:46 +0000 (+0000) Subject: Tell regexp engine to do extra analysis on doBlockLevels() paragraph-level X-Git-Tag: 1.5.0alpha1~1228 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/password.php?a=commitdiff_plain;h=7a4c860accb0e97e1efef0b9fe089a39f1c46a26;p=lhc%2Fweb%2Fwiklou.git Tell regexp engine to do extra analysis on doBlockLevels() paragraph-level HTML checking. This speeds up this part of the operation from about 30ms to about 7ms in Zuiderzee_Works on my test rig. --- diff --git a/includes/Parser.php b/includes/Parser.php index e17ad5a03c..a087f2a8a8 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -1572,13 +1572,14 @@ class Parser $lastPrefix = $pref2; } if( 0 == $prefixLength ) { + wfProfileIn( "$fname-paragraph" ); # No prefix (not in list)--go to paragraph mode $uniq_prefix = UNIQ_PREFIX; // XXX: use a stack for nestable elements like span, table and div - $openmatch = preg_match('/(closeParagraph(); @@ -1627,6 +1628,7 @@ class Parser } } } + wfProfileOut( "$fname-paragraph" ); } if ($paragraphStack === false) { $output .= $t."\n";