r81894 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81893‎ | r81894 | r81895 >
Date:16:11, 10 February 2011
Author:platonides
Status:ok
Tags:
Comment:
Adding more wfProfileOut()
Modified paths:
  • /trunk/phase3/includes/BagOStuff.php (modified) (history)
  • /trunk/phase3/includes/Linker.php (modified) (history)
  • /trunk/phase3/includes/parser/Parser.php (modified) (history)
  • /trunk/phase3/includes/parser/Parser_LinkHooks.php (modified) (history)
  • /trunk/phase3/includes/parser/Tidy.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/BagOStuff.php
@@ -725,6 +725,7 @@
726726
727727 $handle = $this->getReader();
728728 if ( !$handle ) {
 729+ wfProfileOut( __METHOD__ );
729730 return null;
730731 }
731732
@@ -755,6 +756,7 @@
756757
757758 $handle = $this->getWriter();
758759 if ( !$handle ) {
 760+ wfProfileOut( __METHOD__ );
759761 return false;
760762 }
761763
@@ -771,6 +773,7 @@
772774
773775 $handle = $this->getWriter();
774776 if ( !$handle ) {
 777+ wfProfileOut( __METHOD__ );
775778 return false;
776779 }
777780
@@ -789,6 +792,7 @@
790793 $handle = $this->getWriter();
791794
792795 if ( !$handle ) {
 796+ wfProfileOut( __METHOD__ );
793797 return false;
794798 }
795799
Index: trunk/phase3/includes/parser/Tidy.php
@@ -173,15 +173,13 @@
174174 $retval = -1;
175175 }
176176
177 - wfProfileOut( __METHOD__ );
178 -
179177 if( !$stderr && $cleansource == '' && $text != '' ) {
180178 // Some kind of error happened, so we couldn't get the corrected text.
181179 // Just give up; we'll use the source text and append a warning.
182 - return null;
183 - } else {
184 - return $cleansource;
 180+ $cleansource = null;
185181 }
 182+ wfProfileOut( __METHOD__ );
 183+ return $cleansource;
186184 }
187185
188186 /**
@@ -199,6 +197,7 @@
200198
201199 if( $stderr ) {
202200 $retval = $tidy->getStatus();
 201+ wfProfileOut( __METHOD__ );
203202 return $tidy->errorBuffer;
204203 } else {
205204 $tidy->cleanRepair();
Index: trunk/phase3/includes/parser/Parser.php
@@ -2448,6 +2448,7 @@
24492449 }
24502450 if ( $stack > 0 ) {
24512451 wfDebug( __METHOD__.": Invalid input; not enough close tags (stack $stack, state $state)\n" );
 2452+ wfProfileOut( __METHOD__ );
24522453 return false;
24532454 }
24542455 wfProfileOut( __METHOD__ );
Index: trunk/phase3/includes/parser/Parser_LinkHooks.php
@@ -265,9 +265,10 @@
266266 if( $return === false ) {
267267 # False (no link) was returned, output plain wikitext
268268 # Build it again as the hook is allowed to modify $paramText
269 - return isset($paramText) ? "[[$titleText|$paramText]]" : "[[$titleText]]";
 269+ $return = isset($paramText) ? "[[$titleText|$paramText]]" : "[[$titleText]]";
270270 }
271271 # Content was returned, return it
 272+ wfProfileOut( __METHOD__ );
272273 return $return;
273274 }
274275
Index: trunk/phase3/includes/Linker.php
@@ -722,6 +722,7 @@
723723 return $this->linkKnown( $title, "$prefix$text$inside", array(), $query ) . $trail;
724724 }
725725 } else {
 726+ wfProfileOut( __METHOD__ );
726727 return "<!-- ERROR -->{$prefix}{$text}{$trail}";
727728 }
728729 }
@@ -1668,6 +1669,7 @@
16691670 */
16701671 public function accesskey( $name ) {
16711672 if ( isset( $this->accesskeycache[$name] ) ) {
 1673+ wfProfileOut( __METHOD__ );
16721674 return $this->accesskeycache[$name];
16731675 }
16741676 wfProfileIn( __METHOD__ );

Follow-up revisions

RevisionCommit summaryAuthorDate
r81900Fix the wrong merge of r81894 after r81893platonides16:47, 10 February 2011
r819211.17wmf1: MFT r81729, r81890, r81891, r81892, r81893, r81894, r81896, r81897,...catrope22:42, 10 February 2011

Status & tagging log