r44439 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r44438‎ | r44439 | r44440 >
Date:00:54, 11 December 2008
Author:brion
Status:ok
Tags:
Comment:
Revert r44381 "Remove noisy profiling"
We... like profiling? :D
Modified paths:
  • /trunk/phase3/includes/Wiki.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Wiki.php
@@ -50,6 +50,7 @@
5151 * @param $request WebRequest
5252 */
5353 function initialize( &$title, &$article, &$output, &$user, $request ) {
 54+ wfProfileIn( __METHOD__ );
5455 $this->preliminaryChecks( $title, $output, $request ) ;
5556 if( !$this->initializeSpecialCases( $title, $output, $request ) ) {
5657 $new_article = $this->initializeArticle( $title, $request );
@@ -59,9 +60,11 @@
6061 } elseif( is_string( $new_article ) ) {
6162 $output->redirect( $new_article );
6263 } else {
 64+ wfProfileOut( __METHOD__ );
6365 throw new MWException( "Shouldn't happen: MediaWiki::initializeArticle() returned neither an object nor a URL" );
6466 }
6567 }
 68+ wfProfileOut( __METHOD__ );
6669 }
6770
6871 /**
@@ -129,6 +132,7 @@
130133 * @param $request WebRequest
131134 */
132135 function preliminaryChecks( &$title, &$output, $request ) {
 136+
133137 if( $request->getCheck( 'search' ) ) {
134138 // Compatibility with old search URLs which didn't use Special:Search
135139 // Just check for presence here, so blank requests still
@@ -137,6 +141,7 @@
138142 // Do this above the read whitelist check for security...
139143 $title = SpecialPage::getTitleFor( 'Search' );
140144 }
 145+
141146 # If the user is not logged in, the Namespace:title of the article must be in
142147 # the Read array in order for the user to see it. (We have to check here to
143148 # catch special pages etc. We check again in Article::view())
@@ -145,6 +150,7 @@
146151 $output->output();
147152 exit;
148153 }
 154+
149155 }
150156
151157 /**
@@ -414,7 +420,10 @@
415421 * @param $request WebRequest
416422 */
417423 function performAction( &$output, &$article, &$title, &$user, &$request ) {
 424+ wfProfileIn( __METHOD__ );
 425+
418426 if( !wfRunHooks( 'MediaWikiPerformAction', array( $output, $article, $title, $user, $request, $this ) ) ) {
 427+ wfProfileOut( __METHOD__ );
419428 return;
420429 }
421430
@@ -505,6 +514,7 @@
506515 $output->showErrorPage( 'nosuchaction', 'nosuchactiontext' );
507516 }
508517 }
 518+ wfProfileOut( __METHOD__ );
509519
510520 }
511521

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r44381Remove noisy profilingaaron04:40, 10 December 2008

Status & tagging log