More profiling sections
authorTim Starling <tstarling@users.mediawiki.org>
Sat, 5 Jun 2004 04:51:24 +0000 (04:51 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Sat, 5 Jun 2004 04:51:24 +0000 (04:51 +0000)
includes/Parser.php

index a22abdf..16ec4c6 100644 (file)
@@ -627,22 +627,29 @@ class Parser
 
        /* private */ function doHeadings( $text )
        {
+               $fname = "Parser::doHeadings";
+               wfProfileIn( $fname );
                for ( $i = 6; $i >= 1; --$i ) {
                        $h = substr( "======", 0, $i );
                        $text = preg_replace( "/^{$h}(.+){$h}(\\s|$)/m",
                          "<h{$i}>\\1</h{$i}>\\2", $text );
                }
+               wfProfileOut( $fname );
                return $text;
        }
 
        /* private */ function doAllQuotes( $text )
        {
+               $fname = "Parser::doAllQuotes";
+               wfProfileIn( $fname );
                $outtext = "";
                $lines = explode( "\n", $text );
                foreach ( $lines as $line ) {
                        $outtext .= $this->doQuotes ( "", $line, "" ) . "\n";
                }
-               return substr($outtext, 0,-1);
+               $outtext = substr($outtext, 0,-1);
+               wfProfileOut( $fname );
+               return $outtext;
        }
 
        /* private */ function doQuotes( $pre, $text, $mode )