Index: trunk/phase3/includes/parser/Parser.php |
— | — | @@ -187,6 +187,9 @@ |
188 | 188 | '[^][<>"\\x00-\\x20\\x7F]+) *([^\]\\x00-\\x08\\x0a-\\x1F]*?)\]/S'; |
189 | 189 | if ( isset( $conf['preprocessorClass'] ) ) { |
190 | 190 | $this->mPreprocessorClass = $conf['preprocessorClass']; |
| 191 | + } elseif ( defined( 'MW_COMPILED' ) ) { |
| 192 | + # Preprocessor_Hash is much faster than Preprocessor_DOM in compiled mode |
| 193 | + $this->mPreprocessorClass = 'Preprocessor_Hash'; |
191 | 194 | } elseif ( extension_loaded( 'domxml' ) ) { |
192 | 195 | # PECL extension that conflicts with the core DOM extension (bug 13770) |
193 | 196 | wfDebug( "Warning: you have the obsolete domxml extension for PHP. Please remove it!\n" ); |
— | — | @@ -196,6 +199,7 @@ |
197 | 200 | } else { |
198 | 201 | $this->mPreprocessorClass = 'Preprocessor_Hash'; |
199 | 202 | } |
| 203 | + wfDebug( __CLASS__ . ": using preprocessor: {$this->mPreprocessorClass}\n" ); |
200 | 204 | } |
201 | 205 | |
202 | 206 | /** |
Index: trunk/phase3/includes/MagicWord.php |
— | — | @@ -197,13 +197,11 @@ |
198 | 198 | * @return MagicWord |
199 | 199 | */ |
200 | 200 | static function &get( $id ) { |
201 | | - wfProfileIn( __METHOD__ ); |
202 | 201 | if ( !isset( self::$mObjects[$id] ) ) { |
203 | 202 | $mw = new MagicWord(); |
204 | 203 | $mw->load( $id ); |
205 | 204 | self::$mObjects[$id] = $mw; |
206 | 205 | } |
207 | | - wfProfileOut( __METHOD__ ); |
208 | 206 | return self::$mObjects[$id]; |
209 | 207 | } |
210 | 208 | |
— | — | @@ -275,6 +273,7 @@ |
276 | 274 | */ |
277 | 275 | function load( $id ) { |
278 | 276 | global $wgContLang; |
| 277 | + wfProfileIn( __METHOD__ ); |
279 | 278 | $this->mId = $id; |
280 | 279 | $wgContLang->getMagic( $this ); |
281 | 280 | if ( !$this->mSynonyms ) { |
— | — | @@ -282,6 +281,7 @@ |
283 | 282 | #throw new MWException( "Error: invalid magic word '$id'" ); |
284 | 283 | wfDebugLog( 'exception', "Error: invalid magic word '$id'\n" ); |
285 | 284 | } |
| 285 | + wfProfileOut( __METHOD__ ); |
286 | 286 | } |
287 | 287 | |
288 | 288 | /** |