r13104 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r13103‎ | r13104 | r13105 >
Date:03:01, 25 February 2006
Author:timstarling
Status:old
Tags:
Comment:
profiling
Modified paths:
  • /trunk/phase3/includes/JobQueue.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/JobQueue.php
@@ -162,6 +162,8 @@
163163 */
164164 function refreshLinks() {
165165 global $wgParser;
 166+ $fname = 'Job::refreshLinks';
 167+ wfProfileIn( $fname );
166168
167169 $dbw =& wfGetDB( DB_MASTER );
168170
@@ -170,19 +172,26 @@
171173
172174 if ( is_null( $this->title ) ) {
173175 $this->error = "refreshLinks: Invalid title";
 176+ wfProfileOut( $fname );
174177 return false;
175178 }
176179
177180 $revision = Revision::newFromTitle( $this->title );
178181 if ( !$revision ) {
179182 $this->error = 'refreshLinks: Article not found "' . $this->title->getPrefixedDBkey() . '"';
 183+ wfProfileOut( $fname );
180184 return false;
181185 }
182186
 187+ wfProfileIn( "$fname-parse" );
183188 $options = new ParserOptions;
184189 $parserOutput = $wgParser->parse( $revision->getText(), $this->title, $options, true, true, $revision->getId() );
 190+ wfProfileOut( "$fname-parse" );
 191+ wfProfileIn( "$fname-update" );
185192 $update = new LinksUpdate( $this->title, $parserOutput, false );
186193 $update->doUpdate();
 194+ wfProfileOut( "$fname-update" );
 195+ wfProfileOut( $fname );
187196 return true;
188197 }
189198

Status & tagging log