From: Tim Starling Date: Sat, 25 Feb 2006 03:01:21 +0000 (+0000) Subject: profiling X-Git-Tag: 1.6.0~277 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=deada22846ec67fdd91a43f2e2cddc24fb0bfff0;p=lhc%2Fweb%2Fwiklou.git profiling --- diff --git a/includes/JobQueue.php b/includes/JobQueue.php index eb62f3675b..da55155399 100644 --- a/includes/JobQueue.php +++ b/includes/JobQueue.php @@ -162,6 +162,8 @@ class Job { */ function refreshLinks() { global $wgParser; + $fname = 'Job::refreshLinks'; + wfProfileIn( $fname ); $dbw =& wfGetDB( DB_MASTER ); @@ -170,19 +172,26 @@ class Job { if ( is_null( $this->title ) ) { $this->error = "refreshLinks: Invalid title"; + wfProfileOut( $fname ); return false; } $revision = Revision::newFromTitle( $this->title ); if ( !$revision ) { $this->error = 'refreshLinks: Article not found "' . $this->title->getPrefixedDBkey() . '"'; + wfProfileOut( $fname ); return false; } + wfProfileIn( "$fname-parse" ); $options = new ParserOptions; $parserOutput = $wgParser->parse( $revision->getText(), $this->title, $options, true, true, $revision->getId() ); + wfProfileOut( "$fname-parse" ); + wfProfileIn( "$fname-update" ); $update = new LinksUpdate( $this->title, $parserOutput, false ); $update->doUpdate(); + wfProfileOut( "$fname-update" ); + wfProfileOut( $fname ); return true; }