From deada22846ec67fdd91a43f2e2cddc24fb0bfff0 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Sat, 25 Feb 2006 03:01:21 +0000 Subject: [PATCH] profiling --- includes/JobQueue.php | 9 +++++++++ 1 file changed, 9 insertions(+) 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; } -- 2.20.1