Remove obvious function-level profiling
authorChad Horohoe <chadh@wikimedia.org>
Wed, 17 Dec 2014 17:41:27 +0000 (09:41 -0800)
committerAaron Schulz <aschulz@wikimedia.org>
Wed, 7 Jan 2015 19:14:24 +0000 (11:14 -0800)
Xhprof generates this data now. Custom profiling of various
sub-function units are kept.

Calls to profiler represented about 3% of page execution
time on Special:BlankPage (1.5% in/out); after this change
it's down to about 0.98% of page execution time.

Change-Id: Id9a1dc9d8f80bbd52e42226b724a1e1213d07af7

117 files changed:
includes/AjaxDispatcher.php
includes/Block.php
includes/Category.php
includes/CategoryFinder.php
includes/CategoryViewer.php
includes/EditPage.php
includes/Export.php
includes/FeedUtils.php
includes/GlobalFunctions.php
includes/HtmlFormatter.php
includes/HttpFunctions.php
includes/Linker.php
includes/MagicWord.php
includes/MediaWiki.php
includes/MessageBlobStore.php
includes/OutputPage.php
includes/PrefixSearch.php
includes/Revision.php
includes/Sanitizer.php
includes/SiteStats.php
includes/StreamFile.php
includes/Title.php
includes/User.php
includes/WatchedItem.php
includes/actions/CreditsAction.php
includes/actions/HistoryAction.php
includes/actions/InfoAction.php
includes/actions/UnwatchAction.php
includes/actions/WatchAction.php
includes/api/ApiParse.php
includes/api/ApiQueryTokens.php
includes/api/ApiTokens.php
includes/cache/BacklinkCache.php
includes/cache/LinkBatch.php
includes/cache/LinkCache.php
includes/cache/LocalisationCache.php
includes/cache/MessageCache.php
includes/cache/UserCache.php
includes/changes/ChangesFeed.php
includes/changes/EnhancedChangesList.php
includes/changes/OldChangesList.php
includes/content/WikitextContent.php
includes/db/DatabaseMysqlBase.php
includes/db/LoadBalancer.php
includes/db/LoadMonitor.php
includes/deferred/DeferredUpdates.php
includes/deferred/HTMLCacheUpdate.php
includes/deferred/LinksUpdate.php
includes/deferred/SearchUpdate.php
includes/deferred/SquidUpdate.php
includes/diff/DairikiDiff.php
includes/diff/DiffFormatter.php
includes/diff/DifferenceEngine.php
includes/diff/TableDiffFormatter.php
includes/filebackend/FSFile.php
includes/filebackend/FileOpBatch.php
includes/filebackend/TempFSFile.php
includes/filebackend/lockmanager/LockManager.php
includes/filerepo/file/File.php
includes/filerepo/file/LocalFile.php
includes/filerepo/file/OldLocalFile.php
includes/jobqueue/JobQueue.php
includes/jobqueue/JobQueueGroup.php
includes/jobqueue/JobRunner.php
includes/jobqueue/aggregator/JobQueueAggregator.php
includes/logging/LogPager.php
includes/mail/EmailNotification.php
includes/media/DjVu.php
includes/media/DjVuImage.php
includes/media/FormatMetadata.php
includes/objectcache/MemcachedClient.php
includes/objectcache/MemcachedPeclBagOStuff.php
includes/objectcache/RedisBagOStuff.php
includes/page/Article.php
includes/page/WikiPage.php
includes/parser/CoreParserFunctions.php
includes/parser/LinkHolderArray.php
includes/parser/MWTidy.php
includes/parser/Parser.php
includes/parser/ParserCache.php
includes/parser/ParserOptions.php
includes/parser/ParserOutput.php
includes/parser/Preprocessor_DOM.php
includes/parser/Preprocessor_Hash.php
includes/parser/StripState.php
includes/poolcounter/PoolCounterRedis.php
includes/resourceloader/ResourceLoader.php
includes/resourceloader/ResourceLoaderFileModule.php
includes/resourceloader/ResourceLoaderModule.php
includes/resourceloader/ResourceLoaderStartUpModule.php
includes/search/SearchMySQL.php
includes/site/SiteSQLStore.php
includes/skins/BaseTemplate.php
includes/skins/MediaWikiI18N.php
includes/skins/Skin.php
includes/skins/SkinTemplate.php
includes/specialpage/SpecialPageFactory.php
includes/specials/SpecialAllMessages.php
includes/specials/SpecialBlockList.php
includes/specials/SpecialContributions.php
includes/specials/SpecialDeletedContributions.php
includes/specials/SpecialMergeHistory.php
includes/specials/SpecialProtectedtitles.php
includes/specials/SpecialSearch.php
includes/specials/SpecialVersion.php
includes/upload/UploadBase.php
includes/utils/IP.php
includes/utils/MWCryptRand.php
languages/Language.php
languages/LanguageConverter.php
languages/classes/LanguageBe_tarask.php
languages/classes/LanguageKk.php
languages/classes/LanguageYue.php
languages/classes/LanguageZh.php
languages/classes/LanguageZh_hans.php
tests/phpunit/MediaWikiTestCase.php
thumb.php

index 9bc92be..b14114d 100644 (file)
@@ -56,8 +56,6 @@ class AjaxDispatcher {
         * Load up our object with user supplied data
         */
        function __construct( Config $config ) {
-               wfProfileIn( __METHOD__ );
-
                $this->config = $config;
 
                $this->mode = "";
@@ -88,13 +86,11 @@ class AjaxDispatcher {
                                }
                                break;
                        default:
-                               wfProfileOut( __METHOD__ );
                                return;
                                # Or we could throw an exception:
                                # throw new MWException( __METHOD__ . ' called without any data (mode empty).' );
                }
 
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -110,11 +106,8 @@ class AjaxDispatcher {
                        return;
                }
 
-               wfProfileIn( __METHOD__ );
-
                if ( !in_array( $this->func_name, $this->config->get( 'AjaxExportList' ) ) ) {
                        wfDebug( __METHOD__ . ' Bad Request for unknown function ' . $this->func_name . "\n" );
-
                        wfHttpError(
                                400,
                                'Bad Request',
@@ -127,7 +120,6 @@ class AjaxDispatcher {
                                'You are not allowed to view pages.' );
                } else {
                        wfDebug( __METHOD__ . ' dispatching ' . $this->func_name . "\n" );
-
                        try {
                                $result = call_user_func_array( $this->func_name, $this->args );
 
@@ -162,6 +154,5 @@ class AjaxDispatcher {
                        }
                }
 
-               wfProfileOut( __METHOD__ );
        }
 }
index 9079fb0..4698f45 100644 (file)
@@ -752,7 +752,6 @@ class Block {
         * @return bool
         */
        public function deleteIfExpired() {
-               wfProfileIn( __METHOD__ );
 
                if ( $this->isExpired() ) {
                        wfDebug( "Block::deleteIfExpired() -- deleting\n" );
@@ -763,7 +762,6 @@ class Block {
                        $retVal = false;
                }
 
-               wfProfileOut( __METHOD__ );
                return $retVal;
        }
 
@@ -1055,7 +1053,6 @@ class Block {
                        return array();
                }
 
-               wfProfileIn( __METHOD__ );
                $conds = array();
                foreach ( array_unique( $ipChain ) as $ipaddr ) {
                        # Discard invalid IP addresses. Since XFF can be spoofed and we do not
@@ -1077,7 +1074,6 @@ class Block {
                }
 
                if ( !count( $conds ) ) {
-                       wfProfileOut( __METHOD__ );
                        return array();
                }
 
@@ -1108,7 +1104,6 @@ class Block {
                        }
                }
 
-               wfProfileOut( __METHOD__ );
                return $blocks;
        }
 
@@ -1140,8 +1135,6 @@ class Block {
                        return $blocks[0];
                }
 
-               wfProfileIn( __METHOD__ );
-
                // Sort hard blocks before soft ones and secondarily sort blocks
                // that disable account creation before those that don't.
                usort( $blocks, function ( Block $a, Block $b ) {
@@ -1222,11 +1215,9 @@ class Block {
                } elseif ( $blocksList['auto'] ) {
                        $chosenBlock = $blocksList['auto'];
                } else {
-                       wfProfileOut( __METHOD__ );
                        throw new MWException( "Proxy block found, but couldn't be classified." );
                }
 
-               wfProfileOut( __METHOD__ );
                return $chosenBlock;
        }
 
index 322b053..2521a65 100644 (file)
@@ -60,7 +60,6 @@ class Category {
                        return true;
                }
 
-               wfProfileIn( __METHOD__ );
 
                $dbr = wfGetDB( DB_SLAVE );
                $row = $dbr->selectRow(
@@ -70,7 +69,6 @@ class Category {
                        __METHOD__
                );
 
-               wfProfileOut( __METHOD__ );
 
                if ( !$row ) {
                        # Okay, there were no contents.  Nothing to initialize.
@@ -258,7 +256,6 @@ class Category {
         * @return TitleArray TitleArray object for category members.
         */
        public function getMembers( $limit = false, $offset = '' ) {
-               wfProfileIn( __METHOD__ );
 
                $dbr = wfGetDB( DB_SLAVE );
 
@@ -284,7 +281,6 @@ class Category {
                        )
                );
 
-               wfProfileOut( __METHOD__ );
 
                return $result;
        }
@@ -318,7 +314,6 @@ class Category {
                        }
                }
 
-               wfProfileIn( __METHOD__ );
 
                $dbw = wfGetDB( DB_MASTER );
                $dbw->startAtomic( __METHOD__ );
@@ -363,7 +358,6 @@ class Category {
                );
                $dbw->endAtomic( __METHOD__ );
 
-               wfProfileOut( __METHOD__ );
 
                # Now we should update our local counts.
                $this->mPages = $result->pages;
index cf537e1..33de740 100644 (file)
@@ -185,7 +185,6 @@ class CategoryFinder {
         * Scans a "parent layer" of the articles/categories in $this->next
         */
        private function scanNextLayer() {
-               $profiler = new ProfileSection( __METHOD__ );
 
                # Find all parents of the article currently in $this->next
                $layer = array();
index f68da95..4d23ed2 100644 (file)
@@ -104,7 +104,6 @@ class CategoryViewer extends ContextSource {
         * @return string HTML output
         */
        public function getHTML() {
-               wfProfileIn( __METHOD__ );
 
                $this->showGallery = $this->getConfig()->get( 'CategoryMagicGallery' )
                        && !$this->getOutput()->mNoGallery;
@@ -140,7 +139,6 @@ class CategoryViewer extends ContextSource {
                # put a div around the headings which are in the user language
                $r = Html::openElement( 'div', $langAttribs ) . $r . '</div>';
 
-               wfProfileOut( __METHOD__ );
                return $r;
        }
 
index 4370295..6497c40 100644 (file)
@@ -467,13 +467,11 @@ class EditPage {
                        return;
                }
 
-               wfProfileIn( __METHOD__ );
                wfDebug( __METHOD__ . ": enter\n" );
 
                // If they used redlink=1 and the page exists, redirect to the main article
                if ( $wgRequest->getBool( 'redlink' ) && $this->mTitle->exists() ) {
                        $wgOut->redirect( $this->mTitle->getFullURL() );
-                       wfProfileOut( __METHOD__ );
                        return;
                }
 
@@ -482,7 +480,6 @@ class EditPage {
 
                if ( $this->live ) {
                        $this->livePreview();
-                       wfProfileOut( __METHOD__ );
                        return;
                }
 
@@ -515,7 +512,6 @@ class EditPage {
 
                        $this->displayPermissionsError( $permErrors );
 
-                       wfProfileOut( __METHOD__ );
                        return;
                }
 
@@ -542,7 +538,6 @@ class EditPage {
                if ( 'save' == $this->formtype ) {
                        if ( !$this->attemptSave() ) {
                                wfProfileOut( __METHOD__ . "-business-end" );
-                               wfProfileOut( __METHOD__ );
                                return;
                        }
                }
@@ -553,7 +548,6 @@ class EditPage {
                        if ( $this->initialiseForm() === false ) {
                                $this->noSuchSectionPage();
                                wfProfileOut( __METHOD__ . "-business-end" );
-                               wfProfileOut( __METHOD__ );
                                return;
                        }
 
@@ -567,7 +561,6 @@ class EditPage {
 
                $this->showEditForm();
                wfProfileOut( __METHOD__ . "-business-end" );
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -732,13 +725,11 @@ class EditPage {
        function importFormData( &$request ) {
                global $wgContLang, $wgUser;
 
-               wfProfileIn( __METHOD__ );
 
                # Section edit can come from either the form or a link
                $this->section = $request->getVal( 'wpSection', $request->getVal( 'section' ) );
 
                if ( $this->section !== null && $this->section !== '' && !$this->isSectionEditSupported() ) {
-                       wfProfileOut( __METHOD__ );
                        throw new ErrorPageError( 'sectioneditnotsupported-title', 'sectioneditnotsupported-text' );
                }
 
@@ -931,7 +922,6 @@ class EditPage {
                // Allow extensions to modify form data
                Hooks::run( 'EditPage::importFormData', array( $this, $request ) );
 
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -992,7 +982,6 @@ class EditPage {
        protected function getContentObject( $def_content = null ) {
                global $wgOut, $wgRequest, $wgUser, $wgContLang;
 
-               wfProfileIn( __METHOD__ );
 
                $content = false;
 
@@ -1105,7 +1094,6 @@ class EditPage {
                        }
                }
 
-               wfProfileOut( __METHOD__ );
                return $content;
        }
 
@@ -1538,7 +1526,6 @@ class EditPage {
 
                $status = Status::newGood();
 
-               wfProfileIn( __METHOD__ );
                wfProfileIn( __METHOD__ . '-checks' );
 
                if ( !Hooks::run( 'EditPage::attemptSave', array( $this ) ) ) {
@@ -1546,7 +1533,6 @@ class EditPage {
                        $status->fatal( 'hookaborted' );
                        $status->value = self::AS_HOOK_ERROR;
                        wfProfileOut( __METHOD__ . '-checks' );
-                       wfProfileOut( __METHOD__ );
                        return $status;
                }
 
@@ -1564,7 +1550,6 @@ class EditPage {
                        $status->fatal( 'spamprotectionmatch', false );
                        $status->value = self::AS_SPAM_ERROR;
                        wfProfileOut( __METHOD__ . '-checks' );
-                       wfProfileOut( __METHOD__ );
                        return $status;
                }
 
@@ -1580,7 +1565,6 @@ class EditPage {
                        );
                        $status->value = self::AS_PARSE_ERROR;
                        wfProfileOut( __METHOD__ . '-checks' );
-                       wfProfileOut( __METHOD__ );
                        return $status;
                }
 
@@ -1593,7 +1577,6 @@ class EditPage {
                                $status->setResult( false, $code );
 
                                wfProfileOut( __METHOD__ . '-checks' );
-                               wfProfileOut( __METHOD__ );
 
                                return $status;
                }
@@ -1624,7 +1607,6 @@ class EditPage {
                        $status->fatal( 'spamprotectionmatch', $match );
                        $status->value = self::AS_SPAM_ERROR;
                        wfProfileOut( __METHOD__ . '-checks' );
-                       wfProfileOut( __METHOD__ );
                        return $status;
                }
                if ( !Hooks::run(
@@ -1635,14 +1617,12 @@ class EditPage {
                        $status->fatal( 'hookaborted' );
                        $status->value = self::AS_HOOK_ERROR;
                        wfProfileOut( __METHOD__ . '-checks' );
-                       wfProfileOut( __METHOD__ );
                        return $status;
                } elseif ( $this->hookError != '' ) {
                        # ...or the hook could be expecting us to produce an error
                        $status->fatal( 'hookaborted' );
                        $status->value = self::AS_HOOK_ERROR_EXPECTED;
                        wfProfileOut( __METHOD__ . '-checks' );
-                       wfProfileOut( __METHOD__ );
                        return $status;
                }
 
@@ -1652,7 +1632,6 @@ class EditPage {
                        # Check block state against master, thus 'false'.
                        $status->setResult( false, self::AS_BLOCKED_PAGE_FOR_USER );
                        wfProfileOut( __METHOD__ . '-checks' );
-                       wfProfileOut( __METHOD__ );
                        return $status;
                }
 
@@ -1662,7 +1641,6 @@ class EditPage {
                        $this->tooBig = true;
                        $status->setResult( false, self::AS_CONTENT_TOO_BIG );
                        wfProfileOut( __METHOD__ . '-checks' );
-                       wfProfileOut( __METHOD__ );
                        return $status;
                }
 
@@ -1670,13 +1648,11 @@ class EditPage {
                        if ( $wgUser->isAnon() ) {
                                $status->setResult( false, self::AS_READ_ONLY_PAGE_ANON );
                                wfProfileOut( __METHOD__ . '-checks' );
-                               wfProfileOut( __METHOD__ );
                                return $status;
                        } else {
                                $status->fatal( 'readonlytext' );
                                $status->value = self::AS_READ_ONLY_PAGE_LOGGED;
                                wfProfileOut( __METHOD__ . '-checks' );
-                               wfProfileOut( __METHOD__ );
                                return $status;
                        }
                }
@@ -1686,7 +1662,6 @@ class EditPage {
                ) {
                        $status->setResult( false, self::AS_NO_CHANGE_CONTENT_MODEL );
                        wfProfileOut( __METHOD__ . '-checks' );
-                       wfProfileOut( __METHOD__ );
                        return $status;
                }
 
@@ -1694,14 +1669,12 @@ class EditPage {
                        $status->fatal( 'readonlytext' );
                        $status->value = self::AS_READ_ONLY_PAGE;
                        wfProfileOut( __METHOD__ . '-checks' );
-                       wfProfileOut( __METHOD__ );
                        return $status;
                }
                if ( $wgUser->pingLimiter() || $wgUser->pingLimiter( 'linkpurge', 0 ) ) {
                        $status->fatal( 'actionthrottledtext' );
                        $status->value = self::AS_RATE_LIMITED;
                        wfProfileOut( __METHOD__ . '-checks' );
-                       wfProfileOut( __METHOD__ );
                        return $status;
                }
 
@@ -1710,7 +1683,6 @@ class EditPage {
                if ( $this->wasDeletedSinceLastEdit() && !$this->recreate ) {
                        $status->setResult( false, self::AS_ARTICLE_WAS_DELETED );
                        wfProfileOut( __METHOD__ . '-checks' );
-                       wfProfileOut( __METHOD__ );
                        return $status;
                }
 
@@ -1727,7 +1699,6 @@ class EditPage {
                                $status->fatal( 'nocreatetext' );
                                $status->value = self::AS_NO_CREATE_PERMISSION;
                                wfDebug( __METHOD__ . ": no create permission\n" );
-                               wfProfileOut( __METHOD__ );
                                return $status;
                        }
 
@@ -1745,12 +1716,10 @@ class EditPage {
                                $this->blankArticle = true;
                                $status->fatal( 'blankarticle' );
                                $status->setResult( false, self::AS_BLANK_ARTICLE );
-                               wfProfileOut( __METHOD__ );
                                return $status;
                        }
 
                        if ( !$this->runPostMergeFilters( $textbox_content, $status, $wgUser ) ) {
-                               wfProfileOut( __METHOD__ );
                                return $status;
                        }
 
@@ -1855,12 +1824,10 @@ class EditPage {
 
                        if ( $this->isConflict ) {
                                $status->setResult( false, self::AS_CONFLICT_DETECTED );
-                               wfProfileOut( __METHOD__ );
                                return $status;
                        }
 
                        if ( !$this->runPostMergeFilters( $content, $status, $wgUser ) ) {
-                               wfProfileOut( __METHOD__ );
                                return $status;
                        }
 
@@ -1870,7 +1837,6 @@ class EditPage {
                                        $this->missingSummary = true;
                                        $status->fatal( 'missingsummary' ); // or 'missingcommentheader' if $section == 'new'. Blegh
                                        $status->value = self::AS_SUMMARY_NEEDED;
-                                       wfProfileOut( __METHOD__ );
                                        return $status;
                                }
 
@@ -1879,7 +1845,6 @@ class EditPage {
                                        $this->missingComment = true;
                                        $status->fatal( 'missingcommenttext' );
                                        $status->value = self::AS_TEXTBOX_EMPTY;
-                                       wfProfileOut( __METHOD__ );
                                        return $status;
                                }
                        } elseif ( !$this->allowBlankSummary
@@ -1890,7 +1855,6 @@ class EditPage {
                                $this->missingSummary = true;
                                $status->fatal( 'missingsummary' );
                                $status->value = self::AS_SUMMARY_NEEDED;
-                               wfProfileOut( __METHOD__ );
                                return $status;
                        }
 
@@ -1934,7 +1898,6 @@ class EditPage {
                                $this->selfRedirect = true;
                                $status->fatal( 'selfredirect' );
                                $status->value = self::AS_SELF_REDIRECT;
-                               wfProfileOut( __METHOD__ );
                                return $status;
                        }
                }
@@ -1944,7 +1907,6 @@ class EditPage {
                if ( $this->kblength > $wgMaxArticleSize ) {
                        $this->tooBig = true;
                        $status->setResult( false, self::AS_MAX_ARTICLE_SIZE_EXCEEDED );
-                       wfProfileOut( __METHOD__ );
                        return $status;
                }
 
@@ -1974,7 +1936,6 @@ class EditPage {
                                // Destroys data doEdit() put in $status->value but who cares
                                $doEditStatus->value = self::AS_END;
                        }
-                       wfProfileOut( __METHOD__ );
                        return $doEditStatus;
                }
 
@@ -1985,7 +1946,6 @@ class EditPage {
                }
                $result['redirect'] = $content->isRedirect();
                $this->updateWatchlist();
-               wfProfileOut( __METHOD__ );
                return $status;
        }
 
@@ -2022,7 +1982,6 @@ class EditPage {
         * @return bool
         */
        private function mergeChangesIntoContent( &$editContent ) {
-               wfProfileIn( __METHOD__ );
 
                $db = wfGetDB( DB_MASTER );
 
@@ -2031,7 +1990,6 @@ class EditPage {
                $baseContent = $baseRevision ? $baseRevision->getContent() : null;
 
                if ( is_null( $baseContent ) ) {
-                       wfProfileOut( __METHOD__ );
                        return false;
                }
 
@@ -2040,7 +1998,6 @@ class EditPage {
                $currentContent = $currentRevision ? $currentRevision->getContent() : null;
 
                if ( is_null( $currentContent ) ) {
-                       wfProfileOut( __METHOD__ );
                        return false;
                }
 
@@ -2050,11 +2007,9 @@ class EditPage {
 
                if ( $result ) {
                        $editContent = $result;
-                       wfProfileOut( __METHOD__ );
                        return true;
                }
 
-               wfProfileOut( __METHOD__ );
                return false;
        }
 
@@ -2373,7 +2328,6 @@ class EditPage {
        function showEditForm( $formCallback = null ) {
                global $wgOut, $wgUser;
 
-               wfProfileIn( __METHOD__ );
 
                # need to parse the preview early so that we know which templates are used,
                # otherwise users with "show preview after edit box" will get a blank list
@@ -2389,7 +2343,6 @@ class EditPage {
                $this->setHeaders();
 
                if ( $this->showHeader() === false ) {
-                       wfProfileOut( __METHOD__ );
                        return;
                }
 
@@ -2593,7 +2546,6 @@ class EditPage {
                        $this->displayPreviewArea( $previewOutput, false );
                }
 
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -3250,7 +3202,6 @@ HTML
                        return '';
                }
 
-               wfProfileIn( __METHOD__ );
 
                $limitReport = Html::rawElement( 'div', array( 'class' => 'mw-limitReportExplanation' ),
                        wfMessage( 'limitreport-title' )->parseAsBlock()
@@ -3286,7 +3237,6 @@ HTML
                        Html::closeElement( 'table' ) .
                        Html::closeElement( 'div' );
 
-               wfProfileOut( __METHOD__ );
 
                return $limitReport;
        }
@@ -3473,7 +3423,6 @@ HTML
                global $wgOut, $wgUser, $wgRawHtml, $wgLang;
                global $wgAllowUserCss, $wgAllowUserJs;
 
-               wfProfileIn( __METHOD__ );
 
                if ( $wgRawHtml && !$this->mTokenOk ) {
                        // Could be an offsite preview attempt. This is very unsafe if
@@ -3486,7 +3435,6 @@ HTML
                                $parsedNote = $wgOut->parse( "<div class='previewnote'>" .
                                        wfMessage( 'session_fail_preview_html' )->text() . "</div>", true, /* interface */true );
                        }
-                       wfProfileOut( __METHOD__ );
                        return $parsedNote;
                }
 
@@ -3500,7 +3448,6 @@ HTML
                                'AlternateEditPreview',
                                array( $this, &$content, &$previewHTML, &$this->mParserOutput ) )
                        ) {
-                               wfProfileOut( __METHOD__ );
                                return $previewHTML;
                        }
 
@@ -3619,7 +3566,6 @@ HTML
                        'class' => 'mw-content-' . $pageViewLang->getDir() );
                $previewHTML = Html::rawElement( 'div', $attribs, $previewHTML );
 
-               wfProfileOut( __METHOD__ );
                return $previewhead . $previewHTML . $this->previewTextAfterContent;
        }
 
index dd5cb0c..4600feb 100644 (file)
@@ -213,7 +213,6 @@ class WikiExporter {
         * @param array $cond
         */
        protected function do_list_authors( $cond ) {
-               wfProfileIn( __METHOD__ );
                $this->author_list = "<contributors>";
                // rev_deleted
 
@@ -239,7 +238,6 @@ class WikiExporter {
                                "</contributor>";
                }
                $this->author_list .= "</contributors>";
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -248,7 +246,6 @@ class WikiExporter {
         * @throws Exception
         */
        protected function dumpFrom( $cond = '' ) {
-               wfProfileIn( __METHOD__ );
                # For logging dumps...
                if ( $this->history & self::LOGS ) {
                        $where = array( 'user_id = log_user' );
@@ -304,7 +301,6 @@ class WikiExporter {
                                }
 
                                // Inform caller about problem
-                               wfProfileOut( __METHOD__ );
                                throw $e;
                        }
                # For page dumps...
@@ -349,7 +345,6 @@ class WikiExporter {
                                $join['revision'] = array( 'INNER JOIN', 'page_id=rev_page AND page_latest=rev_id' );
                                # One, and only one hook should set this, and return false
                                if ( Hooks::run( 'WikiExporter::dumpStableQuery', array( &$tables, &$opts, &$join ) ) ) {
-                                       wfProfileOut( __METHOD__ );
                                        throw new MWException( __METHOD__ . " given invalid history dump type." );
                                }
                        } elseif ( $this->history & WikiExporter::RANGE ) {
@@ -358,7 +353,6 @@ class WikiExporter {
                                $opts['ORDER BY'] = array( 'rev_page ASC', 'rev_id ASC' );
                        } else {
                                # Unknown history specification parameter?
-                               wfProfileOut( __METHOD__ );
                                throw new MWException( __METHOD__ . " given invalid history dump type." );
                        }
                        # Query optimization hacks
@@ -417,7 +411,6 @@ class WikiExporter {
                                throw $e;
                        }
                }
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -651,7 +644,6 @@ class XmlDumpWriter {
         * @access private
         */
        function writeRevision( $row ) {
-               wfProfileIn( __METHOD__ );
 
                $out = "    <revision>\n";
                $out .= "      " . Xml::element( 'id', null, strval( $row->rev_id ) ) . "\n";
@@ -726,7 +718,6 @@ class XmlDumpWriter {
 
                $out .= "    </revision>\n";
 
-               wfProfileOut( __METHOD__ );
                return $out;
        }
 
@@ -739,7 +730,6 @@ class XmlDumpWriter {
         * @access private
         */
        function writeLogItem( $row ) {
-               wfProfileIn( __METHOD__ );
 
                $out = "  <logitem>\n";
                $out .= "    " . Xml::element( 'id', null, strval( $row->log_id ) ) . "\n";
@@ -773,7 +763,6 @@ class XmlDumpWriter {
 
                $out .= "  </logitem>\n";
 
-               wfProfileOut( __METHOD__ );
                return $out;
        }
 
index 6937c32..7936b37 100644 (file)
@@ -106,7 +106,6 @@ class FeedUtils {
                $comment, $actiontext = ''
        ) {
                global $wgFeedDiffCutoff, $wgLang;
-               wfProfileIn( __METHOD__ );
 
                // log entries
                $completeText = '<p>' . implode( ' ',
@@ -124,7 +123,6 @@ class FeedUtils {
                // Can't diff special pages, unreadable pages or pages with no new revision
                // to compare against: just return the text.
                if ( $title->getNamespace() < 0 || $accErrors || !$newid ) {
-                       wfProfileOut( __METHOD__ );
                        return $completeText;
                }
 
@@ -208,7 +206,6 @@ class FeedUtils {
                }
                $completeText .= $diffText;
 
-               wfProfileOut( __METHOD__ );
                return $completeText;
        }
 
index 403566e..a3f0a48 100644 (file)
@@ -1515,10 +1515,8 @@ function wfMsgForContentNoTrans( $key ) {
 function wfMsgReal( $key, $args, $useDB = true, $forContent = false, $transform = true ) {
        wfDeprecated( __METHOD__, '1.21' );
 
-       wfProfileIn( __METHOD__ );
        $message = wfMsgGetKey( $key, $useDB, $forContent, $transform );
        $message = wfMsgReplaceArgs( $message, $args );
-       wfProfileOut( __METHOD__ );
        return $message;
 }
 
@@ -4010,7 +4008,6 @@ function wfUnpack( $format, $data, $length = false ) {
  */
 function wfIsBadImage( $name, $contextTitle = false, $blacklist = null ) {
        static $badImageCache = null; // based on bad_image_list msg
-       wfProfileIn( __METHOD__ );
 
        # Handle redirects
        $redirectTitle = RepoGroup::singleton()->checkRedirect( Title::makeTitle( NS_FILE, $name ) );
@@ -4021,7 +4018,6 @@ function wfIsBadImage( $name, $contextTitle = false, $blacklist = null ) {
        # Run the extension hook
        $bad = false;
        if ( !Hooks::run( 'BadImage', array( $name, &$bad ) ) ) {
-               wfProfileOut( __METHOD__ );
                return $bad;
        }
 
@@ -4071,7 +4067,6 @@ function wfIsBadImage( $name, $contextTitle = false, $blacklist = null ) {
 
        $contextKey = $contextTitle ? $contextTitle->getPrefixedDBkey() : false;
        $bad = isset( $badImages[$name] ) && !isset( $badImages[$name][$contextKey] );
-       wfProfileOut( __METHOD__ );
        return $bad;
 }
 
index f74c15a..77b8d35 100644 (file)
@@ -133,7 +133,6 @@ class HtmlFormatter {
         * @return array Array of removed DOMElements
         */
        public function filterContent() {
-               wfProfileIn( __METHOD__ );
                $removals = $this->parseItemsToRemove();
 
                // Bail out early if nothing to do
@@ -143,7 +142,6 @@ class HtmlFormatter {
                        },
                        true
                ) ) {
-                       wfProfileOut( __METHOD__ );
                        return array();
                }
 
@@ -202,7 +200,6 @@ class HtmlFormatter {
                        $removed = array_merge( $removed, $this->removeElements( $elements ) );
                }
 
-               wfProfileOut( __METHOD__ );
                return $removed;
        }
 
@@ -235,7 +232,6 @@ class HtmlFormatter {
         * @return string
         */
        private function fixLibXML( $html ) {
-               wfProfileIn( __METHOD__ );
                static $replacements;
                if ( !$replacements ) {
                        // We don't include rules like '&#34;' => '&amp;quot;' because entities had already been
@@ -249,7 +245,6 @@ class HtmlFormatter {
                }
                $html = $replacements->replace( $html );
                $html = mb_convert_encoding( $html, 'UTF-8', 'HTML-ENTITIES' );
-               wfProfileOut( __METHOD__ );
                return $html;
        }
 
@@ -264,7 +259,6 @@ class HtmlFormatter {
         * @return string Processed HTML
         */
        public function getText( $element = null ) {
-               wfProfileIn( __METHOD__ );
 
                if ( $this->doc ) {
                        wfProfileIn( __METHOD__ . '-dom' );
@@ -309,7 +303,6 @@ class HtmlFormatter {
                }
                wfProfileOut( __METHOD__ . '-flatten' );
 
-               wfProfileOut( __METHOD__ );
                return $html;
        }
 
@@ -350,7 +343,6 @@ class HtmlFormatter {
         * @return array
         */
        protected function parseItemsToRemove() {
-               wfProfileIn( __METHOD__ );
                $removals = array(
                        'ID' => array(),
                        'TAG' => array(),
@@ -372,7 +364,6 @@ class HtmlFormatter {
                        $removals['TAG'][] = 'video';
                }
 
-               wfProfileOut( __METHOD__ );
                return $removals;
        }
 }
index f9ee14b..3749b1c 100644 (file)
@@ -436,7 +436,6 @@ class MWHttpRequest {
         * @return Status
         */
        public function execute() {
-               wfProfileIn( __METHOD__ );
 
                $this->content = "";
 
@@ -454,7 +453,6 @@ class MWHttpRequest {
                        $this->setUserAgent( Http::userAgent() );
                }
 
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -463,7 +461,6 @@ class MWHttpRequest {
         * found in an array in the member variable headerList.
         */
        protected function parseHeader() {
-               wfProfileIn( __METHOD__ );
 
                $lastname = "";
 
@@ -482,7 +479,6 @@ class MWHttpRequest {
 
                $this->parseCookies();
 
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -616,7 +612,6 @@ class MWHttpRequest {
         * Parse the cookies in the response headers and store them in the cookie jar.
         */
        protected function parseCookies() {
-               wfProfileIn( __METHOD__ );
 
                if ( !$this->cookieJar ) {
                        $this->cookieJar = new CookieJar;
@@ -629,7 +624,6 @@ class MWHttpRequest {
                        }
                }
 
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -717,12 +711,10 @@ class CurlHttpRequest extends MWHttpRequest {
        }
 
        public function execute() {
-               wfProfileIn( __METHOD__ );
 
                parent::execute();
 
                if ( !$this->status->isOK() ) {
-                       wfProfileOut( __METHOD__ );
                        return $this->status;
                }
 
@@ -768,7 +760,6 @@ class CurlHttpRequest extends MWHttpRequest {
                $curlHandle = curl_init( $this->url );
 
                if ( !curl_setopt_array( $curlHandle, $this->curlOptions ) ) {
-                       wfProfileOut( __METHOD__ );
                        throw new MWException( "Error setting curl options." );
                }
 
@@ -797,7 +788,6 @@ class CurlHttpRequest extends MWHttpRequest {
                $this->parseHeader();
                $this->setStatus();
 
-               wfProfileOut( __METHOD__ );
 
                return $this->status;
        }
@@ -834,7 +824,6 @@ class PhpHttpRequest extends MWHttpRequest {
        }
 
        public function execute() {
-               wfProfileIn( __METHOD__ );
 
                parent::execute();
 
@@ -940,13 +929,11 @@ class PhpHttpRequest extends MWHttpRequest {
 
                if ( $fh === false ) {
                        $this->status->fatal( 'http-request-error' );
-                       wfProfileOut( __METHOD__ );
                        return $this->status;
                }
 
                if ( $result['timed_out'] ) {
                        $this->status->fatal( 'http-timed-out', $this->url );
-                       wfProfileOut( __METHOD__ );
                        return $this->status;
                }
 
@@ -968,7 +955,6 @@ class PhpHttpRequest extends MWHttpRequest {
                }
                fclose( $fh );
 
-               wfProfileOut( __METHOD__ );
 
                return $this->status;
        }
index 2bc36b1..b806619 100644 (file)
@@ -197,7 +197,6 @@ class Linker {
                        wfWarn( __METHOD__ . ': Requires $target to be a Title object.', 2 );
                        return "<!-- ERROR -->$html";
                }
-               wfProfileIn( __METHOD__ );
 
                if ( is_string( $query ) ) {
                        // some functions withing core using this still hand over query strings
@@ -212,7 +211,6 @@ class Linker {
                if ( !Hooks::run( 'LinkBegin',
                        array( $dummy, $target, &$html, &$customAttribs, &$query, &$options, &$ret ) )
                ) {
-                       wfProfileOut( __METHOD__ );
                        return $ret;
                }
 
@@ -255,7 +253,6 @@ class Linker {
                        $ret = Html::rawElement( 'a', $attribs, $html );
                }
 
-               wfProfileOut( __METHOD__ );
                return $ret;
        }
 
@@ -280,7 +277,6 @@ class Linker {
         * @return string
         */
        private static function linkUrl( $target, $query, $options ) {
-               wfProfileIn( __METHOD__ );
                # We don't want to include fragments for broken links, because they
                # generally make no sense.
                if ( in_array( 'broken', $options ) && $target->hasFragment() ) {
@@ -306,7 +302,6 @@ class Linker {
                }
 
                $ret = $target->getLinkURL( $query, false, $proto );
-               wfProfileOut( __METHOD__ );
                return $ret;
        }
 
@@ -320,7 +315,6 @@ class Linker {
         * @return array
         */
        private static function linkAttribs( $target, $attribs, $options ) {
-               wfProfileIn( __METHOD__ );
                global $wgUser;
                $defaults = array();
 
@@ -370,7 +364,6 @@ class Linker {
                                $ret[$key] = $val;
                        }
                }
-               wfProfileOut( __METHOD__ );
                return $ret;
        }
 
@@ -933,7 +926,6 @@ class Linker {
                }
 
                global $wgEnableUploads, $wgUploadMissingFileUrl, $wgUploadNavigationUrl;
-               wfProfileIn( __METHOD__ );
                if ( $label == '' ) {
                        $label = $title->getPrefixedText();
                }
@@ -946,19 +938,16 @@ class Linker {
                        $redir = RepoGroup::singleton()->getLocalRepo()->checkRedirect( $title );
 
                        if ( $redir ) {
-                               wfProfileOut( __METHOD__ );
                                return self::linkKnown( $title, $encLabel, array(), wfCgiToArray( $query ) );
                        }
 
                        $href = self::getUploadUrl( $title, $query );
 
-                       wfProfileOut( __METHOD__ );
                        return '<a href="' . htmlspecialchars( $href ) . '" class="new" title="' .
                                htmlspecialchars( $title->getPrefixedText(), ENT_QUOTES ) . '">' .
                                $encLabel . '</a>';
                }
 
-               wfProfileOut( __METHOD__ );
                return self::linkKnown( $title, $encLabel, array(), wfCgiToArray( $query ) );
        }
 
@@ -1295,7 +1284,6 @@ class Linker {
         * @return mixed|string
         */
        public static function formatComment( $comment, $title = null, $local = false ) {
-               wfProfileIn( __METHOD__ );
 
                # Sanitize text a bit:
                $comment = str_replace( "\n", " ", $comment );
@@ -1306,7 +1294,6 @@ class Linker {
                $comment = self::formatAutocomments( $comment, $title, $local );
                $comment = self::formatLinksInComment( $comment, $title, $local );
 
-               wfProfileOut( __METHOD__ );
                return $comment;
        }
 
@@ -1515,7 +1502,6 @@ class Linker {
                # ../Foobar/ -- convert to CurrentPage/Foobar, use 'Foobar' as text
                #              (from CurrentPage/CurrentSubPage)
 
-               wfProfileIn( __METHOD__ );
                $ret = $target; # default return value is no change
 
                # Some namespaces don't allow subpages,
@@ -1574,7 +1560,6 @@ class Linker {
                        }
                }
 
-               wfProfileOut( __METHOD__ );
                return $ret;
        }
 
@@ -1997,7 +1982,6 @@ class Linker {
                $section = false, $more = null
        ) {
                global $wgLang;
-               wfProfileIn( __METHOD__ );
 
                $outText = '';
                if ( count( $templates ) > 0 ) {
@@ -2077,7 +2061,6 @@ class Linker {
 
                        $outText .= '</ul>';
                }
-               wfProfileOut( __METHOD__ );
                return $outText;
        }
 
@@ -2089,7 +2072,6 @@ class Linker {
         * @return string HTML output
         */
        public static function formatHiddenCategories( $hiddencats ) {
-               wfProfileIn( __METHOD__ );
 
                $outText = '';
                if ( count( $hiddencats ) > 0 ) {
@@ -2106,7 +2088,6 @@ class Linker {
                        }
                        $outText .= '</ul>';
                }
-               wfProfileOut( __METHOD__ );
                return $outText;
        }
 
@@ -2135,7 +2116,6 @@ class Linker {
         *   escape), or false for no title attribute
         */
        public static function titleAttrib( $name, $options = null ) {
-               wfProfileIn( __METHOD__ );
 
                $message = wfMessage( "tooltip-$name" );
 
@@ -2164,7 +2144,6 @@ class Linker {
                        }
                }
 
-               wfProfileOut( __METHOD__ );
                return $tooltip;
        }
 
@@ -2184,7 +2163,6 @@ class Linker {
                if ( isset( self::$accesskeycache[$name] ) ) {
                        return self::$accesskeycache[$name];
                }
-               wfProfileIn( __METHOD__ );
 
                $message = wfMessage( "accesskey-$name" );
 
@@ -2200,7 +2178,6 @@ class Linker {
                        }
                }
 
-               wfProfileOut( __METHOD__ );
                self::$accesskeycache[$name] = $accesskey;
                return self::$accesskeycache[$name];
        }
@@ -2308,7 +2285,6 @@ class Linker {
        static function makeLinkObj( $nt, $text = '', $query = '', $trail = '', $prefix = '' ) {
                wfDeprecated( __METHOD__, '1.21' );
 
-               wfProfileIn( __METHOD__ );
                $query = wfCgiToArray( $query );
                list( $inside, $trail ) = self::splitTrail( $trail );
                if ( $text === '' ) {
@@ -2317,7 +2293,6 @@ class Linker {
 
                $ret = self::link( $nt, "$prefix$text$inside", array(), $query ) . $trail;
 
-               wfProfileOut( __METHOD__ );
                return $ret;
        }
 
@@ -2342,7 +2317,6 @@ class Linker {
        ) {
                wfDeprecated( __METHOD__, '1.21' );
 
-               wfProfileIn( __METHOD__ );
 
                if ( $text == '' ) {
                        $text = self::linkText( $title );
@@ -2357,7 +2331,6 @@ class Linker {
                $ret = self::link( $title, "$prefix$text$inside", $attribs, $query,
                        array( 'known', 'noclasses' ) ) . $trail;
 
-               wfProfileOut( __METHOD__ );
                return $ret;
        }
 
index 4b24a00..7476fcf 100644 (file)
@@ -330,15 +330,12 @@ class MagicWord {
         */
        function load( $id ) {
                global $wgContLang;
-               wfProfileIn( __METHOD__ );
                $this->mId = $id;
                $wgContLang->getMagic( $this );
                if ( !$this->mSynonyms ) {
                        $this->mSynonyms = array( 'brionmademeputthishere' );
-                       wfProfileOut( __METHOD__ );
                        throw new MWException( "Error: invalid magic word '$id'" );
                }
-               wfProfileOut( __METHOD__ );
        }
 
        /**
index 53b4d20..7adaca0 100644 (file)
@@ -157,7 +157,6 @@ class MediaWiki {
        private function performRequest() {
                global $wgTitle;
 
-               wfProfileIn( __METHOD__ );
 
                $request = $this->context->getRequest();
                $requestTitle = $title = $this->context->getTitle();
@@ -176,7 +175,6 @@ class MediaWiki {
                        || $title->isSpecial( 'Badtitle' )
                ) {
                        $this->context->setTitle( SpecialPage::getTitleFor( 'Badtitle' ) );
-                       wfProfileOut( __METHOD__ );
                        throw new BadTitleError();
                }
 
@@ -201,7 +199,6 @@ class MediaWiki {
                        $this->context->setTitle( $badTitle );
                        $wgTitle = $badTitle;
 
-                       wfProfileOut( __METHOD__ );
                        throw new PermissionsError( 'read', $permErrors );
                }
 
@@ -225,7 +222,6 @@ class MediaWiki {
                                $output->redirect( $url, 301 );
                        } else {
                                $this->context->setTitle( SpecialPage::getTitleFor( 'Badtitle' ) );
-                               wfProfileOut( __METHOD__ );
                                throw new BadTitleError();
                        }
                // Redirect loops, no title in URL, $wgUsePathInfo URLs, and URLs with a variant
@@ -283,7 +279,6 @@ class MediaWiki {
                        } elseif ( is_string( $article ) ) {
                                $output->redirect( $article );
                        } else {
-                               wfProfileOut( __METHOD__ );
                                throw new MWException( "Shouldn't happen: MediaWiki::initializeArticle()"
                                        . " returned neither an object nor a URL" );
                        }
@@ -294,7 +289,6 @@ class MediaWiki {
                        $user->addAutopromoteOnceGroups( 'onView' );
                }
 
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -304,7 +298,6 @@ class MediaWiki {
         * @return mixed An Article, or a string to redirect to another URL
         */
        private function initializeArticle() {
-               wfProfileIn( __METHOD__ );
 
                $title = $this->context->getTitle();
                if ( $this->context->canUseWikiPage() ) {
@@ -322,7 +315,6 @@ class MediaWiki {
                // NS_MEDIAWIKI has no redirects.
                // It is also used for CSS/JS, so performance matters here...
                if ( $title->getNamespace() == NS_MEDIAWIKI ) {
-                       wfProfileOut( __METHOD__ );
                        return $article;
                }
 
@@ -353,7 +345,6 @@ class MediaWiki {
                                if ( is_string( $target ) ) {
                                        if ( !$this->config->get( 'DisableHardRedirects' ) ) {
                                                // we'll need to redirect
-                                               wfProfileOut( __METHOD__ );
                                                return $target;
                                        }
                                }
@@ -374,7 +365,6 @@ class MediaWiki {
                        }
                }
 
-               wfProfileOut( __METHOD__ );
                return $article;
        }
 
@@ -385,7 +375,6 @@ class MediaWiki {
         * @param Title $requestTitle The original title, before any redirects were applied
         */
        private function performAction( Page $page, Title $requestTitle ) {
-               wfProfileIn( __METHOD__ );
 
                $request = $this->context->getRequest();
                $output = $this->context->getOutput();
@@ -395,7 +384,6 @@ class MediaWiki {
                if ( !Hooks::run( 'MediaWikiPerformAction',
                                array( $output, $page, $title, $user, $request, $this ) )
                ) {
-                       wfProfileOut( __METHOD__ );
                        return;
                }
 
@@ -412,7 +400,6 @@ class MediaWiki {
                        }
 
                        $action->show();
-                       wfProfileOut( __METHOD__ );
                        return;
                }
 
@@ -421,7 +408,6 @@ class MediaWiki {
                        $output->showErrorPage( 'nosuchaction', 'nosuchactiontext' );
                }
 
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -456,7 +442,6 @@ class MediaWiki {
         * @return bool
         */
        private function checkMaxLag() {
-               wfProfileIn( __METHOD__ );
                $maxLag = $this->context->getRequest()->getVal( 'maxlag' );
                if ( !is_null( $maxLag ) ) {
                        list( $host, $lag ) = wfGetLB()->getMaxLag();
@@ -472,19 +457,16 @@ class MediaWiki {
                                        echo "Waiting for a database server: $lag seconds lagged\n";
                                }
 
-                               wfProfileOut( __METHOD__ );
 
                                exit;
                        }
                }
-               wfProfileOut( __METHOD__ );
                return true;
        }
 
        private function main() {
                global $wgTitle;
 
-               wfProfileIn( __METHOD__ );
 
                $request = $this->context->getRequest();
 
@@ -497,7 +479,6 @@ class MediaWiki {
 
                        $dispatcher = new AjaxDispatcher( $this->config );
                        $dispatcher->performAction( $this->context->getUser() );
-                       wfProfileOut( __METHOD__ );
                        return;
                }
 
@@ -550,7 +531,6 @@ class MediaWiki {
                                $output->addVaryHeader( 'X-Forwarded-Proto' );
                                $output->redirect( $redirUrl );
                                $output->output();
-                               wfProfileOut( __METHOD__ );
                                return;
                        }
                }
@@ -572,7 +552,6 @@ class MediaWiki {
                                        // Tell OutputPage that output is taken care of
                                        $this->context->getOutput()->disable();
                                        wfProfileOut( 'main-try-filecache' );
-                                       wfProfileOut( __METHOD__ );
                                        return;
                                }
                        }
@@ -592,7 +571,6 @@ class MediaWiki {
                // Output everything!
                $this->context->getOutput()->output();
 
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -626,7 +604,6 @@ class MediaWiki {
                        return; // recursion guard
                }
 
-               $section = new ProfileSection( __METHOD__ );
 
                if ( $jobRunRate < 1 ) {
                        $max = mt_getrandmax();
index e3b4dbe..6f7e8e5 100644 (file)
@@ -56,9 +56,7 @@ class MessageBlobStore {
         * @return array An array mapping module names to message blobs
         */
        public function get( ResourceLoader $resourceLoader, $modules, $lang ) {
-               wfProfileIn( __METHOD__ );
                if ( !count( $modules ) ) {
-                       wfProfileOut( __METHOD__ );
                        return array();
                }
                // Try getting from the DB first
@@ -73,7 +71,6 @@ class MessageBlobStore {
                        }
                }
 
-               wfProfileOut( __METHOD__ );
                return $blobs;
        }
 
index f8d5ab7..7b79506 100644 (file)
@@ -1685,7 +1685,6 @@ class OutputPage extends ContextSource {
        ) {
                global $wgParser;
 
-               wfProfileIn( __METHOD__ );
 
                $popts = $this->parserOptions();
                $oldTidy = $popts->setTidy( $tidy );
@@ -1700,7 +1699,6 @@ class OutputPage extends ContextSource {
 
                $this->addParserOutput( $parserOutput );
 
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -2173,7 +2171,6 @@ class OutputPage extends ContextSource {
                        return;
                }
 
-               wfProfileIn( __METHOD__ );
 
                $response = $this->getRequest()->response();
                $config = $this->getConfig();
@@ -2209,7 +2206,6 @@ class OutputPage extends ContextSource {
                                }
                        }
 
-                       wfProfileOut( __METHOD__ );
                        return;
                } elseif ( $this->mStatusCode ) {
                        $message = HttpStatus::getMessage( $this->mStatusCode );
@@ -2264,9 +2260,7 @@ class OutputPage extends ContextSource {
                        // adding of CSS or Javascript by extensions.
                        Hooks::run( 'BeforePageDisplay', array( &$this, &$sk ) );
 
-                       wfProfileIn( 'Output-skin' );
                        $sk->outputPage();
-                       wfProfileOut( 'Output-skin' );
                }
 
                // This hook allows last minute changes to final overall output by modifying output buffer
@@ -2276,7 +2270,6 @@ class OutputPage extends ContextSource {
 
                ob_end_flush();
 
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -2626,7 +2619,6 @@ class OutputPage extends ContextSource {
        public function headElement( Skin $sk, $includeStyle = true ) {
                global $wgContLang;
 
-               $section = new ProfileSection( __METHOD__ );
 
                $userdir = $this->getLanguage()->getDir();
                $sitedir = $wgContLang->getDir();
index caa3ef5..2885679 100644 (file)
@@ -95,7 +95,6 @@ abstract class PrefixSearch {
         * @return array
         */
        public function searchWithVariants( $search, $limit, array $namespaces, $offset = 0 ) {
-               wfProfileIn( __METHOD__ );
                $searches = $this->search( $search, $limit, $namespaces, $offset );
 
                // if the content language has variants, try to retrieve fallback results
@@ -116,7 +115,6 @@ abstract class PrefixSearch {
                                }
                        }
                }
-               wfProfileOut( __METHOD__ );
                return $searches;
        }
 
index 8ba79df..6ec7eaf 100644 (file)
@@ -515,7 +515,6 @@ class Revision implements IDBAccessObject {
                if ( !$revIds ) {
                        return $revLens; // empty
                }
-               wfProfileIn( __METHOD__ );
                $res = $db->select( 'revision',
                        array( 'rev_id', 'rev_len' ),
                        array( 'rev_id' => $revIds ),
@@ -523,7 +522,6 @@ class Revision implements IDBAccessObject {
                foreach ( $res as $row ) {
                        $revLens[$row->rev_id] = $row->rev_len;
                }
-               wfProfileOut( __METHOD__ );
                return $revLens;
        }
 
@@ -1213,7 +1211,6 @@ class Revision implements IDBAccessObject {
         * @return string Text the text requested or false on failure
         */
        public static function getRevisionText( $row, $prefix = 'old_', $wiki = false ) {
-               wfProfileIn( __METHOD__ );
 
                # Get data
                $textField = $prefix . 'text';
@@ -1228,7 +1225,6 @@ class Revision implements IDBAccessObject {
                if ( isset( $row->$textField ) ) {
                        $text = $row->$textField;
                } else {
-                       wfProfileOut( __METHOD__ );
                        return false;
                }
 
@@ -1237,7 +1233,6 @@ class Revision implements IDBAccessObject {
                        $url = $text;
                        $parts = explode( '://', $url, 2 );
                        if ( count( $parts ) == 1 || $parts[1] == '' ) {
-                               wfProfileOut( __METHOD__ );
                                return false;
                        }
                        $text = ExternalStore::fetchFromURL( $url, array( 'wiki' => $wiki ) );
@@ -1247,7 +1242,6 @@ class Revision implements IDBAccessObject {
                if ( $text !== false ) {
                        $text = self::decompressRevisionText( $text, $flags );
                }
-               wfProfileOut( __METHOD__ );
                return $text;
        }
 
@@ -1331,7 +1325,6 @@ class Revision implements IDBAccessObject {
        public function insertOn( $dbw ) {
                global $wgDefaultExternalStore, $wgContentHandlerUseDB;
 
-               wfProfileIn( __METHOD__ );
 
                $this->checkContentModel();
 
@@ -1343,7 +1336,6 @@ class Revision implements IDBAccessObject {
                        // Store and get the URL
                        $data = ExternalStore::insertToDefault( $data );
                        if ( !$data ) {
-                               wfProfileOut( __METHOD__ );
                                throw new MWException( "Unable to store text to external storage" );
                        }
                        if ( $flags ) {
@@ -1403,7 +1395,6 @@ class Revision implements IDBAccessObject {
                        $title = $this->getTitle();
 
                        if ( $title === null ) {
-                               wfProfileOut( __METHOD__ );
                                throw new MWException( "Insufficient information to determine the title of the "
                                        . "revision's page!" );
                        }
@@ -1421,7 +1412,6 @@ class Revision implements IDBAccessObject {
 
                Hooks::run( 'RevisionInsertComplete', array( &$this, $data, $flags ) );
 
-               wfProfileOut( __METHOD__ );
                return $this->mId;
        }
 
@@ -1490,7 +1480,6 @@ class Revision implements IDBAccessObject {
         * @return string|bool The revision's text, or false on failure
         */
        protected function loadText() {
-               wfProfileIn( __METHOD__ );
 
                // Caching may be beneficial for massive use of external storage
                global $wgRevisionCacheExpiry, $wgMemc;
@@ -1500,7 +1489,6 @@ class Revision implements IDBAccessObject {
                        $text = $wgMemc->get( $key );
                        if ( is_string( $text ) ) {
                                wfDebug( __METHOD__ . ": got id $textId from cache\n" );
-                               wfProfileOut( __METHOD__ );
                                return $text;
                        }
                }
@@ -1548,7 +1536,6 @@ class Revision implements IDBAccessObject {
                        $wgMemc->set( $key, $text, $wgRevisionCacheExpiry );
                }
 
-               wfProfileOut( __METHOD__ );
 
                return $text;
        }
@@ -1571,7 +1558,6 @@ class Revision implements IDBAccessObject {
        public static function newNullRevision( $dbw, $pageId, $summary, $minor, $user = null ) {
                global $wgContentHandlerUseDB;
 
-               wfProfileIn( __METHOD__ );
 
                $fields = array( 'page_latest', 'page_namespace', 'page_title',
                                                'rev_text_id', 'rev_len', 'rev_sha1' );
@@ -1619,7 +1605,6 @@ class Revision implements IDBAccessObject {
                        $revision = null;
                }
 
-               wfProfileOut( __METHOD__ );
                return $revision;
        }
 
index d35bbec..e173e6a 100644 (file)
@@ -372,7 +372,6 @@ class Sanitizer {
                static $htmlpairsStatic, $htmlsingle, $htmlsingleonly, $htmlnest, $tabletags,
                        $htmllist, $listtags, $htmlsingleallowed, $htmlelementsStatic, $staticInitialised;
 
-               wfProfileIn( __METHOD__ );
 
                // Base our staticInitialised variable off of the global config state so that if the globals
                // are changed (like in the screwed up test system) we will re-initialise the settings.
@@ -600,7 +599,6 @@ class Sanitizer {
                                $text .= '&lt;' . str_replace( '>', '&gt;', $x );
                        }
                }
-               wfProfileOut( __METHOD__ );
                return $text;
        }
 
@@ -615,7 +613,6 @@ class Sanitizer {
         * @return string
         */
        static function removeHTMLcomments( $text ) {
-               wfProfileIn( __METHOD__ );
                while ( ( $start = strpos( $text, '<!--' ) ) !== false ) {
                        $end = strpos( $text, '-->', $start + 4 );
                        if ( $end === false ) {
@@ -646,7 +643,6 @@ class Sanitizer {
                                $text = substr_replace( $text, '', $start, $end - $start );
                        }
                }
-               wfProfileOut( __METHOD__ );
                return $text;
        }
 
index 32c6761..15c18f3 100644 (file)
@@ -221,7 +221,6 @@ class SiteStats {
         * @return int
         */
        static function pagesInNs( $ns ) {
-               wfProfileIn( __METHOD__ );
                if ( !isset( self::$pageCount[$ns] ) ) {
                        $dbr = wfGetDB( DB_SLAVE );
                        self::$pageCount[$ns] = (int)$dbr->selectField(
@@ -231,7 +230,6 @@ class SiteStats {
                                __METHOD__
                        );
                }
-               wfProfileOut( __METHOD__ );
                return self::$pageCount[$ns];
        }
 
index 2503150..d69006e 100644 (file)
@@ -39,10 +39,8 @@ class StreamFile {
         * @return bool Success
         */
        public static function stream( $fname, $headers = array(), $sendErrors = true ) {
-               wfProfileIn( __METHOD__ );
 
                if ( FileBackend::isStoragePath( $fname ) ) { // sanity
-                       wfProfileOut( __METHOD__ );
                        throw new MWException( __FUNCTION__ . " given storage path '$fname'." );
                }
 
@@ -61,7 +59,6 @@ class StreamFile {
                        $ok = false; // failed
                }
 
-               wfProfileOut( __METHOD__ );
                return $ok;
        }
 
index 24f4331..2adda65 100644 (file)
@@ -1782,7 +1782,6 @@ class Title {
         * @return string The URL
         */
        public function getLinkURL( $query = '', $query2 = false, $proto = PROTO_RELATIVE ) {
-               wfProfileIn( __METHOD__ );
                if ( $this->isExternal() || $proto !== PROTO_RELATIVE ) {
                        $ret = $this->getFullURL( $query, $query2, $proto );
                } elseif ( $this->getPrefixedText() === '' && $this->hasFragment() ) {
@@ -1790,7 +1789,6 @@ class Title {
                } else {
                        $ret = $this->getLocalURL( $query, $query2 ) . $this->getFragmentForURL();
                }
-               wfProfileOut( __METHOD__ );
                return $ret;
        }
 
@@ -2444,7 +2442,6 @@ class Title {
        protected function getUserPermissionsErrorsInternal( $action, $user,
                $doExpensiveQueries = true, $short = false
        ) {
-               wfProfileIn( __METHOD__ );
 
                # Read has special handling
                if ( $action == 'read' ) {
@@ -2485,7 +2482,6 @@ class Title {
                        $errors = $this->$method( $action, $user, $errors, $doExpensiveQueries, $short );
                }
 
-               wfProfileOut( __METHOD__ );
                return $errors;
        }
 
@@ -2721,7 +2717,6 @@ class Title {
                        return array( $this->mHasCascadingRestrictions, $pagerestrictions );
                }
 
-               wfProfileIn( __METHOD__ );
 
                $dbr = wfGetDB( DB_SLAVE );
 
@@ -2797,7 +2792,6 @@ class Title {
                        $this->mHasCascadingRestrictions = $sources;
                }
 
-               wfProfileOut( __METHOD__ );
                return array( $sources, $pagerestrictions );
        }
 
@@ -4623,16 +4617,13 @@ class Title {
         */
        public function getPageLanguage() {
                global $wgLang, $wgLanguageCode;
-               wfProfileIn( __METHOD__ );
                if ( $this->isSpecialPage() ) {
                        // special pages are in the user language
-                       wfProfileOut( __METHOD__ );
                        return $wgLang;
                }
 
                // Checking if DB language is set
                if ( $this->mDbPageLanguage ) {
-                       wfProfileOut( __METHOD__ );
                        return wfGetLangObj( $this->mDbPageLanguage );
                }
 
@@ -4650,7 +4641,6 @@ class Title {
                        $langObj = wfGetLangObj( $this->mPageLanguage[0] );
                }
 
-               wfProfileOut( __METHOD__ );
                return $langObj;
        }
 
index 88004dc..62f7ec0 100644 (file)
@@ -324,7 +324,6 @@ class User implements IDBAccessObject {
                if ( $this->mLoadedItems === true ) {
                        return;
                }
-               wfProfileIn( __METHOD__ );
 
                // Set it now to avoid infinite recursion in accessors
                $this->mLoadedItems = true;
@@ -353,10 +352,8 @@ class User implements IDBAccessObject {
                                Hooks::run( 'UserLoadAfterLoadFromSession', array( $this ) );
                                break;
                        default:
-                               wfProfileOut( __METHOD__ );
                                throw new MWException( "Unrecognised value for User->mFrom: \"{$this->mFrom}\"" );
                }
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -1019,7 +1016,6 @@ class User implements IDBAccessObject {
         * @param string|bool $name
         */
        public function loadDefaults( $name = false ) {
-               wfProfileIn( __METHOD__ );
 
                $passwordFactory = self::getPasswordFactory();
 
@@ -1051,7 +1047,6 @@ class User implements IDBAccessObject {
 
                Hooks::run( 'UserLoadDefaults', array( $this, $name ) );
 
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -1489,7 +1484,6 @@ class User implements IDBAccessObject {
                        return;
                }
 
-               wfProfileIn( __METHOD__ );
                wfDebug( __METHOD__ . ": checking...\n" );
 
                // Initialize data...
@@ -1564,7 +1558,6 @@ class User implements IDBAccessObject {
                // Extensions
                Hooks::run( 'GetBlockedStatus', array( &$this ) );
 
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -1596,7 +1589,6 @@ class User implements IDBAccessObject {
         * @return bool True if blacklisted.
         */
        public function inDnsBlacklist( $ip, $bases ) {
-               wfProfileIn( __METHOD__ );
 
                $found = false;
                // @todo FIXME: IPv6 ???  (http://bugs.php.net/bug.php?id=33170)
@@ -1631,7 +1623,6 @@ class User implements IDBAccessObject {
                        }
                }
 
-               wfProfileOut( __METHOD__ );
                return $found;
        }
 
@@ -1648,7 +1639,6 @@ class User implements IDBAccessObject {
                if ( !$wgProxyList ) {
                        return false;
                }
-               wfProfileIn( __METHOD__ );
 
                if ( !is_array( $wgProxyList ) ) {
                        // Load from the specified file
@@ -1665,7 +1655,6 @@ class User implements IDBAccessObject {
                } else {
                        $ret = false;
                }
-               wfProfileOut( __METHOD__ );
                return $ret;
        }
 
@@ -1717,7 +1706,6 @@ class User implements IDBAccessObject {
                }
 
                global $wgMemc;
-               wfProfileIn( __METHOD__ );
                wfProfileIn( __METHOD__ . '-' . $action );
 
                $limits = $wgRateLimits[$action];
@@ -1800,7 +1788,6 @@ class User implements IDBAccessObject {
                }
 
                wfProfileOut( __METHOD__ . '-' . $action );
-               wfProfileOut( __METHOD__ );
                return $triggered;
        }
 
@@ -1835,7 +1822,6 @@ class User implements IDBAccessObject {
         */
        public function isBlockedFrom( $title, $bFromSlave = false ) {
                global $wgBlockAllowsUTEdit;
-               wfProfileIn( __METHOD__ );
 
                $blocked = $this->isBlocked( $bFromSlave );
                $allowUsertalk = ( $wgBlockAllowsUTEdit ? $this->mAllowUsertalk : false );
@@ -1848,7 +1834,6 @@ class User implements IDBAccessObject {
 
                Hooks::run( 'UserIsBlockedFrom', array( $this, $title, &$blocked, &$allowUsertalk ) );
 
-               wfProfileOut( __METHOD__ );
                return $blocked;
        }
 
@@ -2930,7 +2915,6 @@ class User implements IDBAccessObject {
         */
        public function getEffectiveGroups( $recache = false ) {
                if ( $recache || is_null( $this->mEffectiveGroups ) ) {
-                       wfProfileIn( __METHOD__ );
                        $this->mEffectiveGroups = array_unique( array_merge(
                                $this->getGroups(), // explicit groups
                                $this->getAutomaticGroups( $recache ) // implicit groups
@@ -2939,7 +2923,6 @@ class User implements IDBAccessObject {
                        Hooks::run( 'UserEffectiveGroups', array( &$this, &$this->mEffectiveGroups ) );
                        // Force reindexation of groups when a hook has unset one of them
                        $this->mEffectiveGroups = array_values( array_unique( $this->mEffectiveGroups ) );
-                       wfProfileOut( __METHOD__ );
                }
                return $this->mEffectiveGroups;
        }
@@ -2953,7 +2936,6 @@ class User implements IDBAccessObject {
         */
        public function getAutomaticGroups( $recache = false ) {
                if ( $recache || is_null( $this->mImplicitGroups ) ) {
-                       wfProfileIn( __METHOD__ );
                        $this->mImplicitGroups = array( '*' );
                        if ( $this->getId() ) {
                                $this->mImplicitGroups[] = 'user';
@@ -2968,7 +2950,6 @@ class User implements IDBAccessObject {
                                // as getEffectiveGroups() depends on this function
                                $this->mEffectiveGroups = null;
                        }
-                       wfProfileOut( __METHOD__ );
                }
                return $this->mImplicitGroups;
        }
@@ -3008,7 +2989,6 @@ class User implements IDBAccessObject {
 
                if ( $this->mEditCount === null ) {
                        /* Populate the count, if it has not been populated yet */
-                       wfProfileIn( __METHOD__ );
                        $dbr = wfGetDB( DB_SLAVE );
                        // check if the user_editcount field has been initialized
                        $count = $dbr->selectField(
@@ -3022,7 +3002,6 @@ class User implements IDBAccessObject {
                                $count = $this->initEditCount();
                        }
                        $this->mEditCount = $count;
-                       wfProfileOut( __METHOD__ );
                }
                return (int)$this->mEditCount;
        }
@@ -3815,7 +3794,6 @@ class User implements IDBAccessObject {
        public function checkPassword( $password ) {
                global $wgAuth, $wgLegacyEncoding;
 
-               $section = new ProfileSection( __METHOD__ );
 
                $this->loadPasswords();
 
index fbd6119..4d22692 100644 (file)
@@ -275,7 +275,6 @@ class WatchedItem {
         * @return bool
         */
        public static function batchAddWatch( array $items ) {
-               $section = new ProfileSection( __METHOD__ );
 
                if ( wfReadOnly() ) {
                        return false;
@@ -331,11 +330,9 @@ class WatchedItem {
         * @return bool
         */
        public function removeWatch() {
-               wfProfileIn( __METHOD__ );
 
                // Only loggedin user can have a watchlist
                if ( wfReadOnly() || $this->mUser->isAnon() || !$this->isAllowed( 'editmywatchlist' ) ) {
-                       wfProfileOut( __METHOD__ );
                        return false;
                }
 
@@ -370,7 +367,6 @@ class WatchedItem {
 
                $this->watched = false;
 
-               wfProfileOut( __METHOD__ );
                return $success;
        }
 
index e064aab..69c856d 100644 (file)
@@ -42,7 +42,6 @@ class CreditsAction extends FormlessAction {
         * @return string HTML
         */
        public function onView() {
-               wfProfileIn( __METHOD__ );
 
                if ( $this->page->getID() == 0 ) {
                        $s = $this->msg( 'nocredits' )->parse();
@@ -50,7 +49,6 @@ class CreditsAction extends FormlessAction {
                        $s = $this->getCredits( -1 );
                }
 
-               wfProfileOut( __METHOD__ );
 
                return Html::rawElement( 'div', array( 'id' => 'mw-credits' ), $s );
        }
@@ -63,7 +61,6 @@ class CreditsAction extends FormlessAction {
         * @return string Html
         */
        public function getCredits( $cnt, $showIfMax = true ) {
-               wfProfileIn( __METHOD__ );
                $s = '';
 
                if ( $cnt != 0 ) {
@@ -73,7 +70,6 @@ class CreditsAction extends FormlessAction {
                        }
                }
 
-               wfProfileOut( __METHOD__ );
 
                return $s;
        }
index 6ee5d2c..06f3bae 100644 (file)
@@ -102,7 +102,6 @@ class HistoryAction extends FormlessAction {
                        return; // Client cache fresh and headers sent, nothing more to do.
                }
 
-               wfProfileIn( __METHOD__ );
 
                $this->preCacheMessages();
                $config = $this->context->getConfig();
@@ -131,7 +130,6 @@ class HistoryAction extends FormlessAction {
                $feedType = $request->getVal( 'feed' );
                if ( $feedType ) {
                        $this->feed( $feedType );
-                       wfProfileOut( __METHOD__ );
 
                        return;
                }
@@ -151,7 +149,6 @@ class HistoryAction extends FormlessAction {
                                        'msgKey' => array( 'moveddeleted-notice' )
                                )
                        );
-                       wfProfileOut( __METHOD__ );
 
                        return;
                }
@@ -215,7 +212,6 @@ class HistoryAction extends FormlessAction {
                );
                $out->preventClickjacking( $pager->getPreventClickjacking() );
 
-               wfProfileOut( __METHOD__ );
        }
 
        /**
index 686f63d..948d289 100644 (file)
@@ -634,7 +634,6 @@ class InfoAction extends FormlessAction {
         * @return array
         */
        protected function pageCounts( Title $title ) {
-               wfProfileIn( __METHOD__ );
                $id = $title->getArticleID();
                $config = $this->context->getConfig();
 
@@ -747,7 +746,6 @@ class InfoAction extends FormlessAction {
                        __METHOD__
                );
 
-               wfProfileOut( __METHOD__ );
 
                return $result;
        }
index e2e5a1d..0a8628d 100644 (file)
@@ -36,9 +36,7 @@ class UnwatchAction extends WatchAction {
        }
 
        public function onSubmit( $data ) {
-               wfProfileIn( __METHOD__ );
                self::doUnwatch( $this->getTitle(), $this->getUser() );
-               wfProfileOut( __METHOD__ );
 
                return true;
        }
index f333efb..9647340 100644 (file)
@@ -48,9 +48,7 @@ class WatchAction extends FormAction {
        }
 
        public function onSubmit( $data ) {
-               wfProfileIn( __METHOD__ );
                self::doWatch( $this->getTitle(), $this->getUser() );
-               wfProfileOut( __METHOD__ );
 
                return true;
        }
index ff91b92..74d1d9a 100644 (file)
@@ -419,7 +419,6 @@ class ApiParse extends ApiBase {
         * @return ParserOptions
         */
        protected function makeParserOptions( WikiPage $pageObj, array $params ) {
-               wfProfileIn( __METHOD__ );
 
                $popts = $pageObj->makeParserOptions( $this->getContext() );
                $popts->enableLimitReport( !$params['disablepp'] );
@@ -427,7 +426,6 @@ class ApiParse extends ApiBase {
                $popts->setIsSectionPreview( $params['sectionpreview'] );
                $popts->setEditSection( !$params['disableeditsection'] );
 
-               wfProfileOut( __METHOD__ );
 
                return $popts;
        }
index e8d7258..2e107ac 100644 (file)
@@ -55,7 +55,6 @@ class ApiQueryTokens extends ApiQueryBase {
        public static function getTokenTypeSalts() {
                static $salts = null;
                if ( !$salts ) {
-                       wfProfileIn( __METHOD__ );
                        $salts = array(
                                'csrf' => '',
                                'watch' => 'watch',
@@ -65,7 +64,6 @@ class ApiQueryTokens extends ApiQueryBase {
                        );
                        Hooks::run( 'ApiQueryTokensRegisterTypes', array( &$salts ) );
                        ksort( $salts );
-                       wfProfileOut( __METHOD__ );
                }
 
                return $salts;
index f7290af..073495c 100644 (file)
@@ -63,7 +63,6 @@ class ApiTokens extends ApiBase {
                if ( $types ) {
                        return $types;
                }
-               wfProfileIn( __METHOD__ );
                $types = array( 'patrol' => array( 'ApiQueryRecentChanges', 'getPatrolToken' ) );
                $names = array( 'edit', 'delete', 'protect', 'move', 'block', 'unblock',
                        'email', 'import', 'watch', 'options' );
@@ -72,7 +71,6 @@ class ApiTokens extends ApiBase {
                }
                Hooks::run( 'ApiTokensGetTokenTypes', array( &$types ) );
                ksort( $types );
-               wfProfileOut( __METHOD__ );
 
                return $types;
        }
index 753263c..4f35c90 100644 (file)
@@ -176,7 +176,6 @@ class BacklinkCache {
         * @return ResultWrapper
         */
        protected function queryLinks( $table, $startId, $endId, $max, $select = 'all' ) {
-               wfProfileIn( __METHOD__ );
 
                $fromField = $this->getPrefix( $table ) . '_from';
 
@@ -231,7 +230,6 @@ class BacklinkCache {
                        }
                }
 
-               wfProfileOut( __METHOD__ );
 
                return $res;
        }
index 48c063f..77e4d49 100644 (file)
@@ -128,11 +128,9 @@ class LinkBatch {
         * @return array Remaining IDs
         */
        protected function executeInto( &$cache ) {
-               wfProfileIn( __METHOD__ );
                $res = $this->doQuery();
                $this->doGenderQuery();
                $ids = $this->addResultToCache( $cache, $res );
-               wfProfileOut( __METHOD__ );
 
                return $ids;
        }
@@ -185,7 +183,6 @@ class LinkBatch {
                if ( $this->isEmpty() ) {
                        return false;
                }
-               wfProfileIn( __METHOD__ );
 
                // This is similar to LinkHolderArray::replaceInternal
                $dbr = wfGetDB( DB_SLAVE );
@@ -205,7 +202,6 @@ class LinkBatch {
                        $caller .= " (for {$this->caller})";
                }
                $res = $dbr->select( $table, $fields, $conds, $caller );
-               wfProfileOut( __METHOD__ );
 
                return $res;
        }
index 82fb12d..492905a 100644 (file)
@@ -218,23 +218,19 @@ class LinkCache {
        public function addLinkObj( $nt ) {
                global $wgContentHandlerUseDB;
 
-               wfProfileIn( __METHOD__ );
 
                $key = $nt->getPrefixedDBkey();
                if ( $this->isBadLink( $key ) || $nt->isExternal() ) {
-                       wfProfileOut( __METHOD__ );
 
                        return 0;
                }
                $id = $this->getGoodLinkID( $key );
                if ( $id != 0 ) {
-                       wfProfileOut( __METHOD__ );
 
                        return $id;
                }
 
                if ( $key === '' ) {
-                       wfProfileOut( __METHOD__ );
 
                        return 0;
                }
@@ -263,7 +259,6 @@ class LinkCache {
                        $id = 0;
                }
 
-               wfProfileOut( __METHOD__ );
 
                return $id;
        }
index 472195c..16aedb2 100644 (file)
@@ -509,7 +509,6 @@ class LocalisationCache {
         * @return array
         */
        protected function readPHPFile( $_fileName, $_fileType ) {
-               wfProfileIn( __METHOD__ );
                // Disable APC caching
                wfSuppressWarnings();
                $_apcEnabled = ini_set( 'apc.cache_by_default', '0' );
@@ -526,10 +525,8 @@ class LocalisationCache {
                } elseif ( $_fileType == 'aliases' ) {
                        $data = compact( 'aliases' );
                } else {
-                       wfProfileOut( __METHOD__ );
                        throw new MWException( __METHOD__ . ": Invalid file type: $_fileType" );
                }
-               wfProfileOut( __METHOD__ );
 
                return $data;
        }
@@ -541,24 +538,20 @@ class LocalisationCache {
         * @return array Array with a 'messages' key, or empty array if the file doesn't exist
         */
        public function readJSONFile( $fileName ) {
-               wfProfileIn( __METHOD__ );
 
                if ( !is_readable( $fileName ) ) {
-                       wfProfileOut( __METHOD__ );
 
                        return array();
                }
 
                $json = file_get_contents( $fileName );
                if ( $json === false ) {
-                       wfProfileOut( __METHOD__ );
 
                        return array();
                }
 
                $data = FormatJson::decode( $json, true );
                if ( $data === null ) {
-                       wfProfileOut( __METHOD__ );
 
                        throw new MWException( __METHOD__ . ": Invalid JSON file: $fileName" );
                }
@@ -570,7 +563,6 @@ class LocalisationCache {
                        }
                }
 
-               wfProfileOut( __METHOD__ );
 
                // The JSON format only supports messages, none of the other variables, so wrap the data
                return array( 'messages' => $data );
@@ -697,7 +689,6 @@ class LocalisationCache {
         */
        protected function readSourceFilesAndRegisterDeps( $code, &$deps ) {
                global $IP;
-               wfProfileIn( __METHOD__ );
 
                // This reads in the PHP i18n file with non-messages l10n data
                $fileName = Language::getMessagesFileName( $code );
@@ -718,7 +709,6 @@ class LocalisationCache {
                $deps['plurals'] = new FileDependency( "$IP/languages/data/plurals.xml" );
                $deps['plurals-mw'] = new FileDependency( "$IP/languages/data/plurals-mediawiki.xml" );
 
-               wfProfileOut( __METHOD__ );
 
                return $data;
        }
@@ -823,10 +813,8 @@ class LocalisationCache {
         */
        public function recache( $code ) {
                global $wgExtensionMessagesFiles;
-               wfProfileIn( __METHOD__ );
 
                if ( !$code ) {
-                       wfProfileOut( __METHOD__ );
                        throw new MWException( "Invalid language code requested" );
                }
                $this->recachedLangs[$code] = true;
@@ -1012,7 +1000,6 @@ class LocalisationCache {
                Hooks::run( 'LocalisationCacheRecache', array( $this, $code, &$allData, &$purgeBlobs ) );
 
                if ( is_null( $allData['namespaceNames'] ) ) {
-                       wfProfileOut( __METHOD__ );
                        throw new MWException( __METHOD__ . ': Localisation data failed sanity check! ' .
                                'Check that your languages/messages/MessagesEn.php file is intact.' );
                }
@@ -1048,7 +1035,6 @@ class LocalisationCache {
                        MessageBlobStore::getInstance()->clear();
                }
 
-               wfProfileOut( __METHOD__ );
        }
 
        /**
index 2f6a1b1..31f410e 100644 (file)
@@ -266,7 +266,6 @@ class MessageCache {
                }
 
                # Loading code starts
-               wfProfileIn( __METHOD__ );
                $success = false; # Keep track of success
                $staleCache = false; # a cache array with expired data, or false if none has been loaded
                $where = array(); # Debug info, delayed to avoid spamming debug log too much
@@ -423,7 +422,6 @@ class MessageCache {
                }
                $info = implode( ', ', $where );
                wfDebugLog( 'MessageCache', __METHOD__ . ": Loading $code... $info\n" );
-               wfProfileOut( __METHOD__ );
 
                return $success;
        }
@@ -437,7 +435,6 @@ class MessageCache {
         * @return array Loaded messages for storing in caches.
         */
        function loadFromDB( $code ) {
-               wfProfileIn( __METHOD__ );
                global $wgMaxMsgCacheEntrySize, $wgLanguageCode, $wgAdaptiveMessageCache;
                $dbr = wfGetDB( DB_SLAVE );
                $cache = array();
@@ -511,7 +508,6 @@ class MessageCache {
 
                $cache['VERSION'] = MSG_CACHE_VERSION;
                $cache['EXPIRY'] = wfTimestamp( TS_MW, time() + $this->mExpiry );
-               wfProfileOut( __METHOD__ );
 
                return $cache;
        }
@@ -524,10 +520,8 @@ class MessageCache {
         */
        public function replace( $title, $text ) {
                global $wgMaxMsgCacheEntrySize;
-               wfProfileIn( __METHOD__ );
 
                if ( $this->mDisable ) {
-                       wfProfileOut( __METHOD__ );
 
                        return;
                }
@@ -577,7 +571,6 @@ class MessageCache {
 
                Hooks::run( 'MessageCacheReplace', array( $title, $text ) );
 
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -610,7 +603,6 @@ class MessageCache {
         * @return bool
         */
        protected function saveToCaches( $cache, $dest, $code = false ) {
-               wfProfileIn( __METHOD__ );
                global $wgUseLocalMessageCache;
 
                $cacheKey = wfMemcKey( 'messages', $code );
@@ -629,7 +621,6 @@ class MessageCache {
                        $this->saveToLocal( $serialized, $hash, $code );
                }
 
-               wfProfileOut( __METHOD__ );
 
                return $success;
        }
@@ -708,7 +699,6 @@ class MessageCache {
        function get( $key, $useDB = true, $langcode = true, $isFullKey = false ) {
                global $wgContLang;
 
-               $section = new ProfileSection( __METHOD__ );
 
                if ( is_int( $key ) ) {
                        // Fix numerical strings that somehow become ints
@@ -1056,7 +1046,6 @@ class MessageCache {
                $popts->setInterfaceMessage( $interface );
                $popts->setTargetLanguage( $language );
 
-               wfProfileIn( __METHOD__ );
                if ( !$title || !$title instanceof Title ) {
                        global $wgTitle;
                        wfDebugLog( 'GlobalTitleFail', __METHOD__ . ' called by ' . wfGetAllCallers( 5 ) . ' with no title set.' );
@@ -1073,7 +1062,6 @@ class MessageCache {
                $res = $parser->parse( $text, $title, $popts, $linestart );
                $this->mInParser = false;
 
-               wfProfileOut( __METHOD__ );
 
                return $res;
        }
index 7f36f5a..8a42489 100644 (file)
@@ -80,7 +80,6 @@ class UserCache {
         * @param string $caller The calling method
         */
        public function doQuery( array $userIds, $options = array(), $caller = '' ) {
-               wfProfileIn( __METHOD__ );
 
                $usersToCheck = array();
                $usersToQuery = array();
@@ -134,7 +133,6 @@ class UserCache {
                }
                $lb->execute();
 
-               wfProfileOut( __METHOD__ );
        }
 
        /**
index 2d3b919..28c2f7e 100644 (file)
@@ -167,14 +167,12 @@ class ChangesFeed {
         * @param Feed $feed
         */
        public static function generateFeed( $rows, &$feed ) {
-               wfProfileIn( __METHOD__ );
                $items = self::buildItems( $rows );
                $feed->outHeader();
                foreach ( $items as $item ) {
                        $feed->outItem( $item );
                }
                $feed->outFooter();
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -183,7 +181,6 @@ class ChangesFeed {
         * @return array
         */
        public static function buildItems( $rows ) {
-               wfProfileIn( __METHOD__ );
                $items = array();
 
                # Merge adjacent edits by one user
@@ -234,7 +231,6 @@ class ChangesFeed {
                        );
                }
 
-               wfProfileOut( __METHOD__ );
                return $items;
        }
 }
index 09fcfd9..b39bca3 100644 (file)
@@ -89,7 +89,6 @@ class EnhancedChangesList extends ChangesList {
         * @return string
         */
        public function recentChangesLine( &$baseRC, $watched = false ) {
-               wfProfileIn( __METHOD__ );
 
                $date = $this->getLanguage()->userDate(
                        $baseRC->mAttribs['rc_timestamp'],
@@ -110,7 +109,6 @@ class EnhancedChangesList extends ChangesList {
                $cacheEntry = $this->cacheEntryFactory->newFromRecentChange( $baseRC, $watched );
                $this->addCacheEntry( $cacheEntry );
 
-               wfProfileOut( __METHOD__ );
 
                return $ret;
        }
@@ -161,7 +159,6 @@ class EnhancedChangesList extends ChangesList {
         * @return string
         */
        protected function recentChangesBlockGroup( $block ) {
-               wfProfileIn( __METHOD__ );
 
                # Add the namespace and title of the block as part of the class
                $classes = array( 'mw-collapsible', 'mw-collapsed', 'mw-enhanced-rc' );
@@ -469,7 +466,6 @@ class EnhancedChangesList extends ChangesList {
 
                $this->rcCacheIndex++;
 
-               wfProfileOut( __METHOD__ );
 
                return $r;
        }
@@ -481,7 +477,6 @@ class EnhancedChangesList extends ChangesList {
         * @return string A HTML formatted line (generated using $r)
         */
        protected function recentChangesBlockLine( $rcObj ) {
-               wfProfileIn( __METHOD__ );
                $query['curid'] = $rcObj->mAttribs['rc_cur_id'];
 
                $type = $rcObj->mAttribs['rc_type'];
@@ -553,7 +548,6 @@ class EnhancedChangesList extends ChangesList {
 
                $r .= "</td></tr></table>\n";
 
-               wfProfileOut( __METHOD__ );
 
                return $r;
        }
@@ -569,7 +563,6 @@ class EnhancedChangesList extends ChangesList {
                        return '';
                }
 
-               wfProfileIn( __METHOD__ );
 
                $blockOut = '';
                foreach ( $this->rc_cache as $block ) {
@@ -580,7 +573,6 @@ class EnhancedChangesList extends ChangesList {
                        }
                }
 
-               wfProfileOut( __METHOD__ );
 
                return '<div>' . $blockOut . '</div>';
        }
index 5067886..2797d81 100644 (file)
@@ -32,7 +32,6 @@ class OldChangesList extends ChangesList {
         * @return string|bool
         */
        public function recentChangesLine( &$rc, $watched = false, $linenumber = null ) {
-               wfProfileIn( __METHOD__ );
 
                $classes = array();
                // use mw-line-even/mw-line-odd class only if linenumber is given (feature from bug 14468)
@@ -57,12 +56,9 @@ class OldChangesList extends ChangesList {
                }
 
                if ( !Hooks::run( 'OldChangesListRecentChangesLine', array( &$this, &$html, $rc, &$classes ) ) ) {
-                       wfProfileOut( __METHOD__ );
-
                        return false;
                }
 
-               wfProfileOut( __METHOD__ );
 
                $dateheader = ''; // $html now contains only <li>...</li>, for hooks' convenience.
                $this->insertDateHeader( $dateheader, $rc->mAttribs['rc_timestamp'] );
index 7593d7c..e774735 100644 (file)
@@ -68,13 +68,11 @@ class WikitextContent extends TextContent {
         * @see Content::replaceSection()
         */
        public function replaceSection( $sectionId, Content $with, $sectionTitle = '' ) {
-               wfProfileIn( __METHOD__ );
 
                $myModelId = $this->getModel();
                $sectionModelId = $with->getModel();
 
                if ( $sectionModelId != $myModelId ) {
-                       wfProfileOut( __METHOD__ );
                        throw new MWException( "Incompatible content model for section: " .
                                "document uses $myModelId but " .
                                "section uses $sectionModelId." );
@@ -84,7 +82,6 @@ class WikitextContent extends TextContent {
                $text = $with->getNativeData();
 
                if ( strval( $sectionId ) === '' ) {
-                       wfProfileOut( __METHOD__ );
 
                        return $with; # XXX: copy first?
                }
@@ -107,7 +104,6 @@ class WikitextContent extends TextContent {
 
                $newContent = new static( $text );
 
-               wfProfileOut( __METHOD__ );
 
                return $newContent;
        }
index 430b20c..7cd5525 100644 (file)
@@ -58,7 +58,6 @@ abstract class DatabaseMysqlBase extends DatabaseBase {
         */
        function open( $server, $user, $password, $dbName ) {
                global $wgAllDBsAreLocalhost, $wgSQLMode;
-               wfProfileIn( __METHOD__ );
 
                # Debugging hack -- fake cluster
                if ( $wgAllDBsAreLocalhost ) {
@@ -83,7 +82,6 @@ abstract class DatabaseMysqlBase extends DatabaseBase {
                        $this->mConn = $this->mysqlConnect( $realServer );
                } catch ( Exception $ex ) {
                        wfProfileOut( "dbconnect-$server" );
-                       wfProfileOut( __METHOD__ );
                        $this->restoreErrorHandler();
                        throw $ex;
                }
@@ -107,7 +105,6 @@ abstract class DatabaseMysqlBase extends DatabaseBase {
                                "Server: $server, User: $user, Password: " .
                                substr( $password, 0, 3 ) . "..., error: " . $error . "\n" );
 
-                       wfProfileOut( __METHOD__ );
 
                        $this->reportConnectionError( $error );
                }
@@ -126,7 +123,6 @@ abstract class DatabaseMysqlBase extends DatabaseBase {
                                wfDebug( "Error selecting database $dbName on server {$this->mServer} " .
                                        "from client host " . wfHostname() . "\n" );
 
-                               wfProfileOut( __METHOD__ );
 
                                $this->reportConnectionError( "Error selecting database $dbName" );
                        }
@@ -149,13 +145,11 @@ abstract class DatabaseMysqlBase extends DatabaseBase {
                                                'method' => __METHOD__,
                                        ) )
                                );
-                               wfProfileOut( __METHOD__ );
                                $this->reportConnectionError( "Error setting sql_mode to $mode" );
                        }
                }
 
                $this->mOpened = true;
-               wfProfileOut( __METHOD__ );
 
                return true;
        }
@@ -671,7 +665,6 @@ abstract class DatabaseMysqlBase extends DatabaseBase {
                        return '0'; // http://dev.mysql.com/doc/refman/5.0/en/miscellaneous-functions.html
                }
 
-               wfProfileIn( __METHOD__ );
                # Commit any open transactions
                $this->commit( __METHOD__, 'flush' );
 
@@ -680,18 +673,15 @@ abstract class DatabaseMysqlBase extends DatabaseBase {
 
                        if ( $wait > $timeout * 1e6 ) {
                                wfDebug( "Fake slave timed out waiting for $pos ($wait us)\n" );
-                               wfProfileOut( __METHOD__ );
 
                                return -1;
                        } elseif ( $wait > 0 ) {
                                wfDebug( "Fake slave waiting $wait us\n" );
                                usleep( $wait );
-                               wfProfileOut( __METHOD__ );
 
                                return 1;
                        } else {
                                wfDebug( "Fake slave up to date ($wait us)\n" );
-                               wfProfileOut( __METHOD__ );
 
                                return 0;
                        }
@@ -711,7 +701,6 @@ abstract class DatabaseMysqlBase extends DatabaseBase {
                        }
                }
 
-               wfProfileOut( __METHOD__ );
 
                return $status;
        }
index f1b3238..789715a 100644 (file)
@@ -340,7 +340,6 @@ class LoadBalancer {
         * @param DBMasterPos $pos
         */
        public function waitFor( $pos ) {
-               wfProfileIn( __METHOD__ );
                $this->mWaitForPos = $pos;
                $i = $this->mReadIndex;
 
@@ -350,7 +349,6 @@ class LoadBalancer {
                                $this->mLaggedSlaveMode = true;
                        }
                }
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -360,7 +358,6 @@ class LoadBalancer {
         * @return bool Success (able to connect and no timeouts reached)
         */
        public function waitForAll( $pos, $timeout = null ) {
-               wfProfileIn( __METHOD__ );
                $this->mWaitForPos = $pos;
                $serverCount = count( $this->mServers );
 
@@ -370,7 +367,6 @@ class LoadBalancer {
                                $ok = $this->doWait( $i, true, $timeout ) && $ok;
                        }
                }
-               wfProfileOut( __METHOD__ );
 
                return $ok;
        }
@@ -457,10 +453,7 @@ class LoadBalancer {
         * @return DatabaseBase
         */
        public function getConnection( $i, $groups = array(), $wiki = false ) {
-               wfProfileIn( __METHOD__ );
-
                if ( $i === null || $i === false ) {
-                       wfProfileOut( __METHOD__ );
                        throw new MWException( 'Attempt to call ' . __METHOD__ .
                                ' with invalid server index' );
                }
@@ -498,7 +491,6 @@ class LoadBalancer {
                        # Couldn't find a working server in getReaderIndex()?
                        if ( $i === false ) {
                                $this->mLastError = 'No working slave server: ' . $this->mLastError;
-                               wfProfileOut( __METHOD__ );
 
                                return $this->reportConnectionError();
                        }
@@ -507,12 +499,10 @@ class LoadBalancer {
                # Now we have an explicit index into the servers array
                $conn = $this->openConnection( $i, $wiki );
                if ( !$conn ) {
-                       wfProfileOut( __METHOD__ );
 
                        return $this->reportConnectionError();
                }
 
-               wfProfileOut( __METHOD__ );
 
                return $conn;
        }
@@ -613,10 +603,8 @@ class LoadBalancer {
         * @access private
         */
        public function openConnection( $i, $wiki = false ) {
-               wfProfileIn( __METHOD__ );
                if ( $wiki !== false ) {
                        $conn = $this->openForeignConnection( $i, $wiki );
-                       wfProfileOut( __METHOD__ );
 
                        return $conn;
                }
@@ -635,7 +623,6 @@ class LoadBalancer {
                                $conn = false;
                        }
                }
-               wfProfileOut( __METHOD__ );
 
                return $conn;
        }
@@ -659,7 +646,6 @@ class LoadBalancer {
         * @return DatabaseBase
         */
        private function openForeignConnection( $i, $wiki ) {
-               wfProfileIn( __METHOD__ );
                list( $dbName, $prefix ) = wfSplitWikiID( $wiki );
                if ( isset( $this->mConns['foreignUsed'][$i][$wiki] ) ) {
                        // Reuse an already-used connection
@@ -712,7 +698,6 @@ class LoadBalancer {
                        $refCount = $conn->getLBInfo( 'foreignPoolRefCount' );
                        $conn->setLBInfo( 'foreignPoolRefCount', $refCount + 1 );
                }
-               wfProfileOut( __METHOD__ );
 
                return $conn;
        }
index b694a6f..39b9531 100644 (file)
@@ -93,7 +93,6 @@ class LoadMonitorMySQL implements LoadMonitor {
                        return array( 0 => 0 );
                }
 
-               $section = new ProfileSection( __METHOD__ );
 
                $expiry = 5;
                $requestRate = 10;
index b0c1899..f0930d7 100644 (file)
@@ -82,13 +82,11 @@ class DeferredUpdates {
        public static function doUpdates( $commit = '' ) {
                global $wgDeferredUpdateList;
 
-               wfProfileIn( __METHOD__ );
 
                $updates = array_merge( $wgDeferredUpdateList, self::$updates );
 
                // No need to get master connections in case of empty updates array
                if ( !count( $updates ) ) {
-                       wfProfileOut( __METHOD__ );
 
                        return;
                }
@@ -122,7 +120,6 @@ class DeferredUpdates {
                        $updates = array_merge( $wgDeferredUpdateList, self::$updates );
                }
 
-               wfProfileOut( __METHOD__ );
        }
 
        /**
index 54fa594..e02cfbc 100644 (file)
@@ -43,7 +43,6 @@ class HTMLCacheUpdate implements DeferrableUpdate {
        }
 
        public function doUpdate() {
-               wfProfileIn( __METHOD__ );
 
                $job = new HTMLCacheUpdateJob(
                        $this->mTitle,
@@ -65,6 +64,5 @@ class HTMLCacheUpdate implements DeferrableUpdate {
                        } );
                }
 
-               wfProfileOut( __METHOD__ );
        }
 }
index 4e5af0b..822c964 100644 (file)
@@ -153,7 +153,6 @@ class LinksUpdate extends SqlDataUpdate {
        }
 
        protected function doIncrementalUpdate() {
-               wfProfileIn( __METHOD__ );
 
                # Page links
                $existing = $this->getExistingLinks();
@@ -227,7 +226,6 @@ class LinksUpdate extends SqlDataUpdate {
                        $this->queueRecursiveJobs();
                }
 
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -251,7 +249,6 @@ class LinksUpdate extends SqlDataUpdate {
         * @param string $table Table to use (e.g. 'templatelinks')
         */
        public static function queueRecursiveJobsForTable( Title $title, $table ) {
-               wfProfileIn( __METHOD__ );
                if ( $title->getBacklinkCache()->hasLinks( $table ) ) {
                        $job = new RefreshLinksJob(
                                $title,
@@ -265,7 +262,6 @@ class LinksUpdate extends SqlDataUpdate {
                        JobQueueGroup::singleton()->push( $job );
                        JobQueueGroup::singleton()->deduplicateRootJob( $job );
                }
-               wfProfileOut( __METHOD__ );
        }
 
        /**
index 8808c20..8de6974 100644 (file)
@@ -78,7 +78,6 @@ class SearchUpdate implements DeferrableUpdate {
                        return;
                }
 
-               wfProfileIn( __METHOD__ );
 
                $page = WikiPage::newFromID( $this->id, WikiPage::READ_LATEST );
 
@@ -108,7 +107,6 @@ class SearchUpdate implements DeferrableUpdate {
                        $search->update( $this->id, $normalTitle, $search->normalizeText( $text ) );
                }
 
-               wfProfileOut( __METHOD__ );
        }
 
        /**
index d4fc7a0..78fbee1 100644 (file)
@@ -110,7 +110,6 @@ class SquidUpdate {
                        self::HTCPPurge( $urlArr );
                }
 
-               wfProfileIn( __METHOD__ );
 
                // Remove duplicate URLs
                $urlArr = array_unique( $urlArr );
@@ -137,7 +136,6 @@ class SquidUpdate {
                }
                $pool->run();
 
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -148,7 +146,6 @@ class SquidUpdate {
         */
        public static function HTCPPurge( $urlArr ) {
                global $wgHTCPRouting, $wgHTCPMulticastTTL;
-               wfProfileIn( __METHOD__ );
 
                // HTCP CLR operation
                $htcpOpCLR = 4;
@@ -166,7 +163,6 @@ class SquidUpdate {
                        $errstr = socket_strerror( socket_last_error() );
                        wfDebugLog( 'squid', __METHOD__ .
                                ": Error opening UDP socket: $errstr" );
-                       wfProfileOut( __METHOD__ );
 
                        return;
                }
@@ -188,7 +184,6 @@ class SquidUpdate {
 
                foreach ( $urlArr as $url ) {
                        if ( !is_string( $url ) ) {
-                               wfProfileOut( __METHOD__ );
                                throw new MWException( 'Bad purge URL' );
                        }
                        $url = self::expand( $url );
@@ -205,7 +200,6 @@ class SquidUpdate {
                        }
                        foreach ( $conf as $subconf ) {
                                if ( !isset( $subconf['host'] ) || !isset( $subconf['port'] ) ) {
-                                       wfProfileOut( __METHOD__ );
                                        throw new MWException( "Invalid HTCP rule for URL $url\n" );
                                }
                        }
@@ -237,7 +231,6 @@ class SquidUpdate {
                                        $subconf['host'], $subconf['port'] );
                        }
                }
-               wfProfileOut( __METHOD__ );
        }
 
        /**
index 30534f0..d327433 100644 (file)
@@ -222,7 +222,6 @@ class DiffEngine {
         * @return DiffOp[]
         */
        public function diff( $from_lines, $to_lines ) {
-               wfProfileIn( __METHOD__ );
 
                // Diff and store locally
                $this->diffLocal( $from_lines, $to_lines );
@@ -272,7 +271,6 @@ class DiffEngine {
                                $edits[] = new DiffOpAdd( $add );
                        }
                }
-               wfProfileOut( __METHOD__ );
 
                return $edits;
        }
@@ -283,7 +281,6 @@ class DiffEngine {
         */
        private function diffLocal( $from_lines, $to_lines ) {
                global $wgExternalDiffEngine;
-               wfProfileIn( __METHOD__ );
 
                if ( $wgExternalDiffEngine == 'wikidiff3' ) {
                        // wikidiff3
@@ -346,7 +343,6 @@ class DiffEngine {
                        // Find the LCS.
                        $this->compareSeq( 0, count( $this->xv ), 0, count( $this->yv ) );
                }
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -582,7 +578,6 @@ class DiffEngine {
         * This is extracted verbatim from analyze.c (GNU diffutils-2.7).
         */
        private function shiftBoundaries( $lines, &$changed, $other_changed ) {
-               wfProfileIn( __METHOD__ );
                $i = 0;
                $j = 0;
 
@@ -697,7 +692,6 @@ class DiffEngine {
                                assert( '$j >= 0 && !$other_changed[$j]' );
                        }
                }
-               wfProfileOut( __METHOD__ );
        }
 }
 
@@ -858,7 +852,6 @@ class MappedDiff extends Diff {
         */
        public function __construct( $from_lines, $to_lines,
                $mapped_from_lines, $mapped_to_lines ) {
-               wfProfileIn( __METHOD__ );
 
                assert( 'count( $from_lines ) == count( $mapped_from_lines )' );
                assert( 'count( $to_lines ) == count( $mapped_to_lines )' );
@@ -880,7 +873,6 @@ class MappedDiff extends Diff {
                                $yi += count( $closing );
                        }
                }
-               wfProfileOut( __METHOD__ );
        }
 }
 
@@ -981,14 +973,12 @@ class WordLevelDiff extends MappedDiff {
         * @param string[] $closing_lines
         */
        public function __construct( $orig_lines, $closing_lines ) {
-               wfProfileIn( __METHOD__ );
 
                list( $orig_words, $orig_stripped ) = $this->split( $orig_lines );
                list( $closing_words, $closing_stripped ) = $this->split( $closing_lines );
 
                parent::__construct( $orig_words, $closing_words,
                        $orig_stripped, $closing_stripped );
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -997,7 +987,6 @@ class WordLevelDiff extends MappedDiff {
         * @return array[]
         */
        private function split( $lines ) {
-               wfProfileIn( __METHOD__ );
 
                $words = array();
                $stripped = array();
@@ -1028,7 +1017,6 @@ class WordLevelDiff extends MappedDiff {
                                }
                        }
                }
-               wfProfileOut( __METHOD__ );
 
                return array( $words, $stripped );
        }
@@ -1037,7 +1025,6 @@ class WordLevelDiff extends MappedDiff {
         * @return string[]
         */
        public function orig() {
-               wfProfileIn( __METHOD__ );
                $orig = new HWLDFWordAccumulator;
 
                foreach ( $this->edits as $edit ) {
@@ -1048,7 +1035,6 @@ class WordLevelDiff extends MappedDiff {
                        }
                }
                $lines = $orig->getLines();
-               wfProfileOut( __METHOD__ );
 
                return $lines;
        }
@@ -1057,7 +1043,6 @@ class WordLevelDiff extends MappedDiff {
         * @return string[]
         */
        public function closing() {
-               wfProfileIn( __METHOD__ );
                $closing = new HWLDFWordAccumulator;
 
                foreach ( $this->edits as $edit ) {
@@ -1068,7 +1053,6 @@ class WordLevelDiff extends MappedDiff {
                        }
                }
                $lines = $closing->getLines();
-               wfProfileOut( __METHOD__ );
 
                return $lines;
        }
index 40df0d7..33ca931 100644 (file)
@@ -57,7 +57,6 @@ abstract class DiffFormatter {
         * @return string The formatted output.
         */
        public function format( $diff ) {
-               wfProfileIn( __METHOD__ );
 
                $xi = $yi = 1;
                $block = false;
@@ -115,7 +114,6 @@ abstract class DiffFormatter {
                }
 
                $end = $this->endDiff();
-               wfProfileOut( __METHOD__ );
 
                return $end;
        }
@@ -130,7 +128,6 @@ abstract class DiffFormatter {
         * @throws MWException If the edit type is not known.
         */
        protected function block( $xbeg, $xlen, $ybeg, $ylen, &$edits ) {
-               wfProfileIn( __METHOD__ );
                $this->startBlock( $this->blockHeader( $xbeg, $xlen, $ybeg, $ylen ) );
                foreach ( $edits as $edit ) {
                        if ( $edit->type == 'copy' ) {
@@ -146,7 +143,6 @@ abstract class DiffFormatter {
                        }
                }
                $this->endBlock();
-               wfProfileOut( __METHOD__ );
        }
 
        protected function startDiff() {
index a458831..3229719 100644 (file)
@@ -232,7 +232,6 @@ class DifferenceEngine extends ContextSource {
        }
 
        public function showDiffPage( $diffOnly = false ) {
-               wfProfileIn( __METHOD__ );
 
                # Allow frames except in certain special cases
                $out = $this->getOutput();
@@ -241,7 +240,6 @@ class DifferenceEngine extends ContextSource {
 
                if ( !$this->loadRevisionData() ) {
                        $this->showMissingRevision();
-                       wfProfileOut( __METHOD__ );
 
                        return;
                }
@@ -253,7 +251,6 @@ class DifferenceEngine extends ContextSource {
                                $this->mOldPage->getUserPermissionsErrors( 'read', $user ) );
                }
                if ( count( $permErrors ) ) {
-                       wfProfileOut( __METHOD__ );
                        throw new PermissionsError( 'read', $permErrors );
                }
 
@@ -454,7 +451,6 @@ class DifferenceEngine extends ContextSource {
                                $this->renderNewRevision();
                        }
                }
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -547,7 +543,6 @@ class DifferenceEngine extends ContextSource {
         * Show the new revision of the page.
         */
        public function renderNewRevision() {
-               wfProfileIn( __METHOD__ );
                $out = $this->getOutput();
                $revHeader = $this->getRevisionHeader( $this->mNewRev );
                # Add "current version as of X" title
@@ -605,7 +600,6 @@ class DifferenceEngine extends ContextSource {
                # Add redundant patrol link on bottom...
                $out->addHTML( $this->markPatrolledLink() );
 
-               wfProfileOut( __METHOD__ );
        }
 
        protected function getParserOutput( WikiPage $page, Revision $rev ) {
@@ -684,23 +678,19 @@ class DifferenceEngine extends ContextSource {
         */
        public function getDiffBody() {
                global $wgMemc;
-               wfProfileIn( __METHOD__ );
                $this->mCacheHit = true;
                // Check if the diff should be hidden from this user
                if ( !$this->loadRevisionData() ) {
-                       wfProfileOut( __METHOD__ );
 
                        return false;
                } elseif ( $this->mOldRev &&
                        !$this->mOldRev->userCan( Revision::DELETED_TEXT, $this->getUser() )
                ) {
-                       wfProfileOut( __METHOD__ );
 
                        return false;
                } elseif ( $this->mNewRev &&
                        !$this->mNewRev->userCan( Revision::DELETED_TEXT, $this->getUser() )
                ) {
-                       wfProfileOut( __METHOD__ );
 
                        return false;
                }
@@ -708,7 +698,6 @@ class DifferenceEngine extends ContextSource {
                if ( $this->mOldRev === false || ( $this->mOldRev && $this->mNewRev
                        && $this->mOldRev->getID() == $this->mNewRev->getID() )
                ) {
-                       wfProfileOut( __METHOD__ );
 
                        return '';
                }
@@ -724,7 +713,6 @@ class DifferenceEngine extends ContextSource {
                                        wfIncrStats( 'diff_cache_hit' );
                                        $difftext = $this->localiseLineNumbers( $difftext );
                                        $difftext .= "\n<!-- diff cache key $key -->\n";
-                                       wfProfileOut( __METHOD__ );
 
                                        return $difftext;
                                }
@@ -734,7 +722,6 @@ class DifferenceEngine extends ContextSource {
 
                // Loadtext is permission safe, this just clears out the diff
                if ( !$this->loadText() ) {
-                       wfProfileOut( __METHOD__ );
 
                        return false;
                }
@@ -754,7 +741,6 @@ class DifferenceEngine extends ContextSource {
                if ( $difftext !== false ) {
                        $difftext = $this->localiseLineNumbers( $difftext );
                }
-               wfProfileOut( __METHOD__ );
 
                return $difftext;
        }
@@ -840,8 +826,6 @@ class DifferenceEngine extends ContextSource {
        public function generateTextDiffBody( $otext, $ntext ) {
                global $wgExternalDiffEngine, $wgContLang;
 
-               wfProfileIn( __METHOD__ );
-
                $otext = str_replace( "\r\n", "\n", $otext );
                $ntext = str_replace( "\r\n", "\n", $ntext );
 
@@ -850,7 +834,6 @@ class DifferenceEngine extends ContextSource {
                        # input text to be HTML-escaped already
                        $otext = htmlspecialchars( $wgContLang->segmentForDiff( $otext ) );
                        $ntext = htmlspecialchars( $wgContLang->segmentForDiff( $ntext ) );
-                       wfProfileOut( __METHOD__ );
 
                        return $wgContLang->unsegmentForDiff( wikidiff_do_diff( $otext, $ntext, 2 ) ) .
                        $this->debug( 'wikidiff1' );
@@ -863,7 +846,6 @@ class DifferenceEngine extends ContextSource {
                        $text = wikidiff2_do_diff( $otext, $ntext, 2 );
                        $text .= $this->debug( 'wikidiff2' );
                        wfProfileOut( 'wikidiff2_do_diff' );
-                       wfProfileOut( __METHOD__ );
 
                        return $text;
                }
@@ -875,13 +857,11 @@ class DifferenceEngine extends ContextSource {
 
                        $tempFile1 = fopen( $tempName1, "w" );
                        if ( !$tempFile1 ) {
-                               wfProfileOut( __METHOD__ );
 
                                return false;
                        }
                        $tempFile2 = fopen( $tempName2, "w" );
                        if ( !$tempFile2 ) {
-                               wfProfileOut( __METHOD__ );
 
                                return false;
                        }
@@ -896,7 +876,6 @@ class DifferenceEngine extends ContextSource {
                        wfProfileOut( __METHOD__ . "-shellexec" );
                        unlink( $tempName1 );
                        unlink( $tempName2 );
-                       wfProfileOut( __METHOD__ );
 
                        return $difftext;
                }
@@ -906,8 +885,7 @@ class DifferenceEngine extends ContextSource {
                $nta = explode( "\n", $wgContLang->segmentForDiff( $ntext ) );
                $diffs = new Diff( $ota, $nta );
                $formatter = new TableDiffFormatter();
-               $difftext = $wgContLang->unsegmentForDiff( $formatter->format( $diffs ) ) .
-                       wfProfileOut( __METHOD__ );
+               $difftext = $wgContLang->unsegmentForDiff( $formatter->format( $diffs ) );
 
                return $difftext;
        }
index db7318f..e5155bf 100644 (file)
@@ -190,7 +190,6 @@ class TableDiffFormatter extends DiffFormatter {
         * @param string[] $closing
         */
        protected function changed( $orig, $closing ) {
-               wfProfileIn( __METHOD__ );
 
                $diff = new WordLevelDiff( $orig, $closing );
                $del = $diff->orig();
@@ -208,7 +207,6 @@ class TableDiffFormatter extends DiffFormatter {
                        echo '<tr>' . $this->emptyLine() .
                                $this->addedLine( $line ) . "</tr>\n";
                }
-               wfProfileOut( __METHOD__ );
        }
 
 }
index 1659c62..06c43ec 100644 (file)
@@ -104,7 +104,6 @@ class FSFile {
         * @return array
         */
        public function getProps( $ext = true ) {
-               wfProfileIn( __METHOD__ );
                wfDebug( __METHOD__ . ": Getting file info for $this->path\n" );
 
                $info = self::placeholderProps();
@@ -146,7 +145,6 @@ class FSFile {
                        wfDebug( __METHOD__ . ": $this->path NOT FOUND!\n" );
                }
 
-               wfProfileOut( __METHOD__ );
 
                return $info;
        }
@@ -201,10 +199,8 @@ class FSFile {
         * @return bool|string False on failure
         */
        public function getSha1Base36( $recache = false ) {
-               wfProfileIn( __METHOD__ );
 
                if ( $this->sha1Base36 !== null && !$recache ) {
-                       wfProfileOut( __METHOD__ );
 
                        return $this->sha1Base36;
                }
@@ -217,7 +213,6 @@ class FSFile {
                        $this->sha1Base36 = wfBaseConvert( $this->sha1Base36, 16, 36, 31 );
                }
 
-               wfProfileOut( __METHOD__ );
 
                return $this->sha1Base36;
        }
index b0d83e0..faa1314 100644 (file)
@@ -55,7 +55,6 @@ class FileOpBatch {
         * @return Status
         */
        public static function attempt( array $performOps, array $opts, FileJournal $journal ) {
-               $section = new ProfileSection( __METHOD__ );
                $status = Status::newGood();
 
                $n = count( $performOps );
index 1b68130..791be7f 100644 (file)
@@ -55,7 +55,6 @@ class TempFSFile extends FSFile {
         * @return TempFSFile|null
         */
        public static function factory( $prefix, $extension = '' ) {
-               wfProfileIn( __METHOD__ );
                $base = wfTempDir() . '/' . $prefix . wfRandomString( 12 );
                $ext = ( $extension != '' ) ? ".{$extension}" : "";
                for ( $attempt = 1; true; $attempt++ ) {
@@ -68,14 +67,12 @@ class TempFSFile extends FSFile {
                                break; // got it
                        }
                        if ( $attempt >= 5 ) {
-                               wfProfileOut( __METHOD__ );
 
                                return null; // give up
                        }
                }
                $tmpFile = new self( $path );
                $tmpFile->autocollect(); // safely instantiated
-               wfProfileOut( __METHOD__ );
 
                return $tmpFile;
        }
index 9253f2e..615ba77 100644 (file)
@@ -102,7 +102,6 @@ abstract class LockManager {
         * @since 1.22
         */
        final public function lockByType( array $pathsByType, $timeout = 0 ) {
-               wfProfileIn( __METHOD__ );
                $status = Status::newGood();
                $pathsByType = $this->normalizePathsByType( $pathsByType );
                $msleep = array( 0, 50, 100, 300, 500 ); // retry backoff times
@@ -116,7 +115,6 @@ abstract class LockManager {
                        usleep( 1e3 * ( next( $msleep ) ?: 1000 ) ); // use 1 sec after enough times
                        $elapsed = microtime( true ) - $start;
                } while ( $elapsed < $timeout && $elapsed >= 0 );
-               wfProfileOut( __METHOD__ );
 
                return $status;
        }
@@ -140,10 +138,8 @@ abstract class LockManager {
         * @since 1.22
         */
        final public function unlockByType( array $pathsByType ) {
-               wfProfileIn( __METHOD__ );
                $pathsByType = $this->normalizePathsByType( $pathsByType );
                $status = $this->doUnlockByType( $pathsByType );
-               wfProfileOut( __METHOD__ );
 
                return $status;
        }
index 600421f..cfb3e3d 100644 (file)
@@ -998,7 +998,6 @@ abstract class File {
        function transform( $params, $flags = 0 ) {
                global $wgThumbnailEpoch;
 
-               wfProfileIn( __METHOD__ );
                do {
                        if ( !$this->canRender() ) {
                                $thumb = $this->iconThumb();
@@ -1071,7 +1070,6 @@ abstract class File {
                        }
                } while ( false );
 
-               wfProfileOut( __METHOD__ );
 
                return is_object( $thumb ) ? $thumb : false;
        }
index 94ef306..30e31c3 100644 (file)
@@ -247,13 +247,11 @@ class LocalFile extends File {
        function loadFromCache() {
                global $wgMemc;
 
-               wfProfileIn( __METHOD__ );
                $this->dataLoaded = false;
                $this->extraDataLoaded = false;
                $key = $this->getCacheKey();
 
                if ( !$key ) {
-                       wfProfileOut( __METHOD__ );
 
                        return false;
                }
@@ -280,7 +278,6 @@ class LocalFile extends File {
                        wfIncrStats( 'image_cache_miss' );
                }
 
-               wfProfileOut( __METHOD__ );
 
                return $this->dataLoaded;
        }
@@ -382,9 +379,7 @@ class LocalFile extends File {
         * @param int $flags
         */
        function loadFromDB( $flags = 0 ) {
-               # Polymorphic function name to distinguish foreign and local fetches
                $fname = get_class( $this ) . '::' . __FUNCTION__;
-               wfProfileIn( $fname );
 
                # Unconditionally set loaded=true, we don't want the accessors constantly rechecking
                $this->dataLoaded = true;
@@ -402,8 +397,6 @@ class LocalFile extends File {
                } else {
                        $this->fileExists = false;
                }
-
-               wfProfileOut( $fname );
        }
 
        /**
@@ -411,9 +404,7 @@ class LocalFile extends File {
         * This covers fields that are sometimes not cached.
         */
        protected function loadExtraFromDB() {
-               # Polymorphic function name to distinguish foreign and local fetches
                $fname = get_class( $this ) . '::' . __FUNCTION__;
-               wfProfileIn( $fname );
 
                # Unconditionally set loaded=true, we don't want the accessors constantly rechecking
                $this->extraDataLoaded = true;
@@ -428,11 +419,8 @@ class LocalFile extends File {
                                $this->$name = $value;
                        }
                } else {
-                       wfProfileOut( $fname );
                        throw new MWException( "Could not find data for image '{$this->getName()}'." );
                }
-
-               wfProfileOut( $fname );
        }
 
        /**
@@ -587,7 +575,6 @@ class LocalFile extends File {
         * Fix assorted version-related problems with the image row by reloading it from the file
         */
        function upgradeRow() {
-               wfProfileIn( __METHOD__ );
 
                $this->lock(); // begin
 
@@ -597,7 +584,6 @@ class LocalFile extends File {
                if ( !$this->fileExists ) {
                        $this->unlock();
                        wfDebug( __METHOD__ . ": file does not exist, aborting\n" );
-                       wfProfileOut( __METHOD__ );
 
                        return;
                }
@@ -607,7 +593,6 @@ class LocalFile extends File {
 
                if ( wfReadOnly() ) {
                        $this->unlock();
-                       wfProfileOut( __METHOD__ );
 
                        return;
                }
@@ -633,7 +618,6 @@ class LocalFile extends File {
 
                $this->unlock(); // done
 
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -889,7 +873,6 @@ class LocalFile extends File {
         * @note This used to purge old thumbnails by default as well, but doesn't anymore.
         */
        function purgeCache( $options = array() ) {
-               wfProfileIn( __METHOD__ );
                // Refresh metadata cache
                $this->purgeMetadataCache();
 
@@ -898,7 +881,6 @@ class LocalFile extends File {
 
                // Purge squid cache for this file
                SquidUpdate::purge( array( $this->getURL() ) );
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -907,7 +889,6 @@ class LocalFile extends File {
         */
        function purgeOldThumbnails( $archiveName ) {
                global $wgUseSquid;
-               wfProfileIn( __METHOD__ );
 
                // Get a list of old thumbnails and URLs
                $files = $this->getThumbnails( $archiveName );
@@ -927,7 +908,6 @@ class LocalFile extends File {
                        SquidUpdate::purge( $urls );
                }
 
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -936,7 +916,6 @@ class LocalFile extends File {
         */
        function purgeThumbnails( $options = array() ) {
                global $wgUseSquid;
-               wfProfileIn( __METHOD__ );
 
                // Delete thumbnails
                $files = $this->getThumbnails();
@@ -968,7 +947,6 @@ class LocalFile extends File {
                        SquidUpdate::purge( $urls );
                }
 
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -1236,7 +1214,6 @@ class LocalFile extends File {
        function recordUpload2( $oldver, $comment, $pageText, $props = false, $timestamp = false,
                $user = null
        ) {
-               wfProfileIn( __METHOD__ );
 
                if ( is_null( $user ) ) {
                        global $wgUser;
@@ -1271,7 +1248,6 @@ class LocalFile extends File {
                if ( !$this->fileExists ) {
                        wfDebug( __METHOD__ . ": File " . $this->getRel() . " went missing!\n" );
                        $dbw->rollback( __METHOD__ );
-                       wfProfileOut( __METHOD__ );
 
                        return false;
                }
@@ -1497,7 +1473,6 @@ class LocalFile extends File {
                        LinksUpdate::queueRecursiveJobsForTable( $this->getTitle(), 'imagelinks' );
                }
 
-               wfProfileOut( __METHOD__ );
 
                return true;
        }
@@ -2243,7 +2218,6 @@ class LocalFileDeleteBatch {
         * @return FileRepoStatus
         */
        function execute() {
-               wfProfileIn( __METHOD__ );
 
                $this->file->lock();
 
@@ -2292,7 +2266,6 @@ class LocalFileDeleteBatch {
                        // Roll back inserts, release lock and abort
                        // TODO: delete the defunct filearchive rows if we are using a non-transactional DB
                        $this->file->unlockAndRollback();
-                       wfProfileOut( __METHOD__ );
 
                        return $this->status;
                }
@@ -2302,7 +2275,6 @@ class LocalFileDeleteBatch {
 
                // Commit and return
                $this->file->unlock();
-               wfProfileOut( __METHOD__ );
 
                return $this->status;
        }
index 710058f..73c614a 100644 (file)
@@ -175,7 +175,6 @@ class OldLocalFile extends LocalFile {
        }
 
        function loadFromDB( $flags = 0 ) {
-               wfProfileIn( __METHOD__ );
 
                $this->dataLoaded = true;
 
@@ -194,14 +193,12 @@ class OldLocalFile extends LocalFile {
                        $this->fileExists = false;
                }
 
-               wfProfileOut( __METHOD__ );
        }
 
        /**
         * Load lazy file metadata from the DB
         */
        protected function loadExtraFromDB() {
-               wfProfileIn( __METHOD__ );
 
                $this->extraDataLoaded = true;
                $dbr = $this->repo->getSlaveDB();
@@ -226,11 +223,9 @@ class OldLocalFile extends LocalFile {
                                $this->$name = $value;
                        }
                } else {
-                       wfProfileOut( __METHOD__ );
                        throw new MWException( "Could not find data for image '{$this->archive_name}'." );
                }
 
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -260,13 +255,11 @@ class OldLocalFile extends LocalFile {
        }
 
        function upgradeRow() {
-               wfProfileIn( __METHOD__ );
                $this->loadFromFile();
 
                # Don't destroy file info of missing files
                if ( !$this->fileExists ) {
                        wfDebug( __METHOD__ . ": file does not exist, aborting\n" );
-                       wfProfileOut( __METHOD__ );
 
                        return;
                }
@@ -291,7 +284,6 @@ class OldLocalFile extends LocalFile {
                                'oi_archive_name' => $this->archive_name ),
                        __METHOD__
                );
-               wfProfileOut( __METHOD__ );
        }
 
        /**
index c00d22e..1f99b1e 100644 (file)
@@ -187,9 +187,7 @@ abstract class JobQueue {
         * @throws JobQueueError
         */
        final public function isEmpty() {
-               wfProfileIn( __METHOD__ );
                $res = $this->doIsEmpty();
-               wfProfileOut( __METHOD__ );
 
                return $res;
        }
@@ -210,9 +208,7 @@ abstract class JobQueue {
         * @throws JobQueueError
         */
        final public function getSize() {
-               wfProfileIn( __METHOD__ );
                $res = $this->doGetSize();
-               wfProfileOut( __METHOD__ );
 
                return $res;
        }
@@ -233,9 +229,7 @@ abstract class JobQueue {
         * @throws JobQueueError
         */
        final public function getAcquiredCount() {
-               wfProfileIn( __METHOD__ );
                $res = $this->doGetAcquiredCount();
-               wfProfileOut( __METHOD__ );
 
                return $res;
        }
@@ -257,9 +251,7 @@ abstract class JobQueue {
         * @since 1.22
         */
        final public function getDelayedCount() {
-               wfProfileIn( __METHOD__ );
                $res = $this->doGetDelayedCount();
-               wfProfileOut( __METHOD__ );
 
                return $res;
        }
@@ -282,9 +274,7 @@ abstract class JobQueue {
         * @throws JobQueueError
         */
        final public function getAbandonedCount() {
-               wfProfileIn( __METHOD__ );
                $res = $this->doGetAbandonedCount();
-               wfProfileOut( __METHOD__ );
 
                return $res;
        }
@@ -336,9 +326,7 @@ abstract class JobQueue {
                        }
                }
 
-               wfProfileIn( __METHOD__ );
                $this->doBatchPush( $jobs, $flags );
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -366,9 +354,7 @@ abstract class JobQueue {
                        throw new MWException( "Unrecognized job type '{$this->type}'." );
                }
 
-               wfProfileIn( __METHOD__ );
                $job = $this->doPop();
-               wfProfileOut( __METHOD__ );
 
                // Flag this job as an old duplicate based on its "root" job...
                try {
@@ -403,9 +389,7 @@ abstract class JobQueue {
                if ( $job->getType() !== $this->type ) {
                        throw new MWException( "Got '{$job->getType()}' job; expected '{$this->type}'." );
                }
-               wfProfileIn( __METHOD__ );
                $this->doAck( $job );
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -449,9 +433,7 @@ abstract class JobQueue {
                if ( $job->getType() !== $this->type ) {
                        throw new MWException( "Got '{$job->getType()}' job; expected '{$this->type}'." );
                }
-               wfProfileIn( __METHOD__ );
                $ok = $this->doDeduplicateRootJob( $job );
-               wfProfileOut( __METHOD__ );
 
                return $ok;
        }
@@ -494,9 +476,7 @@ abstract class JobQueue {
                if ( $job->getType() !== $this->type ) {
                        throw new MWException( "Got '{$job->getType()}' job; expected '{$this->type}'." );
                }
-               wfProfileIn( __METHOD__ );
                $isDuplicate = $this->doIsRootJobOldDuplicate( $job );
-               wfProfileOut( __METHOD__ );
 
                return $isDuplicate;
        }
@@ -538,9 +518,7 @@ abstract class JobQueue {
         * @return void
         */
        final public function delete() {
-               wfProfileIn( __METHOD__ );
                $this->doDelete();
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -560,9 +538,7 @@ abstract class JobQueue {
         * @throws JobQueueError
         */
        final public function waitForBackups() {
-               wfProfileIn( __METHOD__ );
                $this->doWaitForBackups();
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -607,9 +583,7 @@ abstract class JobQueue {
         * @return void
         */
        final public function flushCaches() {
-               wfProfileIn( __METHOD__ );
                $this->doFlushCaches();
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -661,7 +635,6 @@ abstract class JobQueue {
         * @since 1.22
         */
        final public function getSiblingQueuesWithJobs( array $types ) {
-               $section = new ProfileSection( __METHOD__ );
 
                return $this->doGetSiblingQueuesWithJobs( $types );
        }
@@ -686,7 +659,6 @@ abstract class JobQueue {
         * @since 1.22
         */
        final public function getSiblingQueueSizes( array $types ) {
-               $section = new ProfileSection( __METHOD__ );
 
                return $this->doGetSiblingQueueSizes( $types );
        }
index b0b35e9..dbb85d7 100644 (file)
@@ -220,12 +220,10 @@ class JobQueueGroup {
        public function waitForBackups() {
                global $wgJobTypeConf;
 
-               wfProfileIn( __METHOD__ );
                // Try to avoid doing this more than once per queue storage medium
                foreach ( $wgJobTypeConf as $type => $conf ) {
                        $this->get( $type )->waitForBackups();
                }
-               wfProfileOut( __METHOD__ );
        }
 
        /**
index 6b19340..8e8d693 100644 (file)
@@ -253,7 +253,6 @@ class JobRunner {
         * @return array Map of (job type => backoff expiry timestamp)
         */
        private function loadBackoffs( array $backoffs, $mode = 'wait' ) {
-               $section = new ProfileSection( __METHOD__ );
 
                $file = wfTempDir() . '/mw-runJobs-backoffs.json';
                if ( is_file( $file ) ) {
@@ -292,7 +291,6 @@ class JobRunner {
         * @return array The new backoffs account for $backoffs and the latest file data
         */
        private function syncBackoffDeltas( array $backoffs, array &$deltas, $mode = 'wait' ) {
-               $section = new ProfileSection( __METHOD__ );
 
                if ( !$deltas ) {
                        return $this->loadBackoffs( $backoffs, $mode );
index 8600eed..bd5c40d 100644 (file)
@@ -73,9 +73,7 @@ abstract class JobQueueAggregator {
         * @return bool Success
         */
        final public function notifyQueueEmpty( $wiki, $type ) {
-               wfProfileIn( __METHOD__ );
                $ok = $this->doNotifyQueueEmpty( $wiki, $type );
-               wfProfileOut( __METHOD__ );
 
                return $ok;
        }
@@ -93,9 +91,7 @@ abstract class JobQueueAggregator {
         * @return bool Success
         */
        final public function notifyQueueNonEmpty( $wiki, $type ) {
-               wfProfileIn( __METHOD__ );
                $ok = $this->doNotifyQueueNonEmpty( $wiki, $type );
-               wfProfileOut( __METHOD__ );
 
                return $ok;
        }
@@ -111,9 +107,7 @@ abstract class JobQueueAggregator {
         * @return array (job type => (list of wiki IDs))
         */
        final public function getAllReadyWikiQueues() {
-               wfProfileIn( __METHOD__ );
                $res = $this->doGetAllReadyWikiQueues();
-               wfProfileOut( __METHOD__ );
 
                return $res;
        }
@@ -129,9 +123,7 @@ abstract class JobQueueAggregator {
         * @return bool Success
         */
        final public function purge() {
-               wfProfileIn( __METHOD__ );
                $res = $this->doPurge();
-               wfProfileOut( __METHOD__ );
 
                return $res;
        }
index 256934e..bf489ab 100644 (file)
@@ -323,7 +323,6 @@ class LogPager extends ReverseChronologicalPager {
        }
 
        public function getStartBody() {
-               wfProfileIn( __METHOD__ );
                # Do a link batch query
                if ( $this->getNumRows() > 0 ) {
                        $lb = new LinkBatch;
@@ -339,7 +338,6 @@ class LogPager extends ReverseChronologicalPager {
                        $lb->execute();
                        $this->mResult->seek( 0 );
                }
-               wfProfileOut( __METHOD__ );
 
                return '';
        }
index 220c6b1..6baa180 100644 (file)
@@ -205,7 +205,6 @@ class EmailNotification {
                global $wgEnotifWatchlist;
                global $wgEnotifMinorEdits, $wgEnotifUserTalk;
 
-               wfProfileIn( __METHOD__ );
 
                # The following code is only run, if several conditions are met:
                # 1. EmailNotification for pages (other than user_talk pages) must be enabled
@@ -226,7 +225,6 @@ class EmailNotification {
 
                Hooks::run( 'UpdateUserMailerFormattedPageStatus', array( &$formattedPageStatus ) );
                if ( !in_array( $this->pageStatus, $formattedPageStatus ) ) {
-                       wfProfileOut( __METHOD__ );
                        throw new MWException( 'Not a valid page status!' );
                }
 
@@ -270,7 +268,6 @@ class EmailNotification {
                }
 
                $this->sendMails();
-               wfProfileOut( __METHOD__ );
        }
 
        /**
index ba60af4..3072a62 100644 (file)
@@ -313,7 +313,6 @@ class DjVuHandler extends ImageHandler {
 
                        return false;
                }
-               wfProfileIn( __METHOD__ );
 
                wfSuppressWarnings();
                try {
@@ -339,7 +338,6 @@ class DjVuHandler extends ImageHandler {
                        wfDebug( "Bogus multipage XML metadata on '{$image->getName()}'\n" );
                }
                wfRestoreWarnings();
-               wfProfileOut( __METHOD__ );
                if ( $gettext ) {
                        return $image->djvuTextTree;
                } else {
index 596d3e8..8ae60cc 100644 (file)
@@ -269,7 +269,6 @@ class DjVuImage {
         */
        function retrieveMetaData() {
                global $wgDjvuToXML, $wgDjvuDump, $wgDjvuTxt;
-               wfProfileIn( __METHOD__ );
 
                if ( !$this->isValid() ) {
                        return false;
@@ -320,7 +319,6 @@ EOR;
                                $xml = $xml . $txt . '</mw-djvu>';
                        }
                }
-               wfProfileOut( __METHOD__ );
 
                return $xml;
        }
index 8cf95dd..b755c5a 100644 (file)
@@ -1595,11 +1595,9 @@ class FormatMetadata extends ContextSource {
        public function fetchExtendedMetadata( File $file ) {
                global $wgMemc;
 
-               wfProfileIn( __METHOD__ );
 
                // If revision deleted, exit immediately
                if ( $file->isDeleted( File::DELETED_FILE ) ) {
-                       wfProfileOut( __METHOD__ );
 
                        return array();
                }
@@ -1634,7 +1632,6 @@ class FormatMetadata extends ContextSource {
                        $wgMemc->set( $cacheKey, $valueToCache, $maxCacheTime );
                }
 
-               wfProfileOut( __METHOD__ );
 
                return $extendedMetadata;
        }
@@ -1657,7 +1654,6 @@ class FormatMetadata extends ContextSource {
                        return $file->getExtendedMetadata() ?: array();
                }
 
-               wfProfileIn( __METHOD__ );
 
                $uploadDate = wfTimestamp( TS_ISO_8601, $file->getTimestamp() );
 
@@ -1697,7 +1693,6 @@ class FormatMetadata extends ContextSource {
                        }
                }
 
-               wfProfileOut( __METHOD__ );
 
                return $fileMetadata;
        }
@@ -1715,7 +1710,6 @@ class FormatMetadata extends ContextSource {
        protected function getExtendedMetadataFromHook( File $file, array $extendedMetadata,
                &$maxCacheTime
        ) {
-               wfProfileIn( __METHOD__ );
 
                Hooks::run( 'GetExtendedMetadata', array(
                        &$extendedMetadata,
@@ -1732,7 +1726,6 @@ class FormatMetadata extends ContextSource {
                        }
                }
 
-               wfProfileOut( __METHOD__ );
 
                return $extendedMetadata;
        }
index 41eebfb..1e04d45 100644 (file)
@@ -413,7 +413,6 @@ class MWMemcached {
         * @return mixed
         */
        public function get( $key, &$casToken = null ) {
-               wfProfileIn( __METHOD__ );
 
                if ( $this->_debug ) {
                        $this->_debugprint( "get($key)\n" );
@@ -421,19 +420,16 @@ class MWMemcached {
 
                if ( !is_array( $key ) && strval( $key ) === '' ) {
                        $this->_debugprint( "Skipping key which equals to an empty string" );
-                       wfProfileOut( __METHOD__ );
                        return false;
                }
 
                if ( !$this->_active ) {
-                       wfProfileOut( __METHOD__ );
                        return false;
                }
 
                $sock = $this->get_sock( $key );
 
                if ( !is_resource( $sock ) ) {
-                       wfProfileOut( __METHOD__ );
                        return false;
                }
 
@@ -446,7 +442,6 @@ class MWMemcached {
 
                $cmd = "gets $key\r\n";
                if ( !$this->_fwrite( $sock, $cmd ) ) {
-                       wfProfileOut( __METHOD__ );
                        return false;
                }
 
@@ -463,7 +458,6 @@ class MWMemcached {
                if ( isset( $val[$key] ) ) {
                        $value = $val[$key];
                }
-               wfProfileOut( __METHOD__ );
                return $value;
        }
 
index fcc37cb..7c0a645 100644 (file)
@@ -120,11 +120,9 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
         * @return mixed
         */
        public function get( $key, &$casToken = null ) {
-               wfProfileIn( __METHOD__ );
                $this->debugLog( "get($key)" );
                $result = $this->client->get( $this->encodeKey( $key ), null, $casToken );
                $result = $this->checkResult( $key, $result );
-               wfProfileOut( __METHOD__ );
                return $result;
        }
 
@@ -243,11 +241,9 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
         * @return array
         */
        public function getMulti( array $keys ) {
-               wfProfileIn( __METHOD__ );
                $this->debugLog( 'getMulti(' . implode( ', ', $keys ) . ')' );
                $callback = array( $this, 'encodeKey' );
                $result = $this->client->getMulti( array_map( $callback, $keys ) );
-               wfProfileOut( __METHOD__ );
                $result = $result ?: array(); // must be an array
                return $this->checkResult( false, $result );
        }
@@ -258,7 +254,6 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
         * @return bool
         */
        public function setMulti( array $data, $exptime = 0 ) {
-               wfProfileIn( __METHOD__ );
                foreach ( $data as $key => $value ) {
                        $encKey = $this->encodeKey( $key );
                        if ( $encKey !== $key ) {
@@ -268,7 +263,6 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
                }
                $this->debugLog( 'setMulti(' . implode( ', ', array_keys( $data ) ) . ')' );
                $result = $this->client->setMulti( $data, $this->fixExpiry( $exptime ) );
-               wfProfileOut( __METHOD__ );
                return $this->checkResult( false, $result );
        }
 }
index ae8cc5b..6836f74 100644 (file)
@@ -73,7 +73,6 @@ class RedisBagOStuff extends BagOStuff {
        }
 
        public function get( $key, &$casToken = null ) {
-               $section = new ProfileSection( __METHOD__ );
 
                list( $server, $conn ) = $this->getConnection( $key );
                if ( !$conn ) {
@@ -93,7 +92,6 @@ class RedisBagOStuff extends BagOStuff {
        }
 
        public function set( $key, $value, $expiry = 0 ) {
-               $section = new ProfileSection( __METHOD__ );
 
                list( $server, $conn ) = $this->getConnection( $key );
                if ( !$conn ) {
@@ -117,7 +115,6 @@ class RedisBagOStuff extends BagOStuff {
        }
 
        public function cas( $casToken, $key, $value, $expiry = 0 ) {
-               $section = new ProfileSection( __METHOD__ );
 
                list( $server, $conn ) = $this->getConnection( $key );
                if ( !$conn ) {
@@ -151,7 +148,6 @@ class RedisBagOStuff extends BagOStuff {
        }
 
        public function delete( $key, $time = 0 ) {
-               $section = new ProfileSection( __METHOD__ );
 
                list( $server, $conn ) = $this->getConnection( $key );
                if ( !$conn ) {
@@ -171,7 +167,6 @@ class RedisBagOStuff extends BagOStuff {
        }
 
        public function getMulti( array $keys ) {
-               $section = new ProfileSection( __METHOD__ );
 
                $batches = array();
                $conns = array();
@@ -217,7 +212,6 @@ class RedisBagOStuff extends BagOStuff {
         * @return bool
         */
        public function setMulti( array $data, $expiry = 0 ) {
-               $section = new ProfileSection( __METHOD__ );
 
                $batches = array();
                $conns = array();
@@ -265,7 +259,6 @@ class RedisBagOStuff extends BagOStuff {
 
 
        public function add( $key, $value, $expiry = 0 ) {
-               $section = new ProfileSection( __METHOD__ );
 
                list( $server, $conn ) = $this->getConnection( $key );
                if ( !$conn ) {
@@ -303,7 +296,6 @@ class RedisBagOStuff extends BagOStuff {
         * @return int|bool New value or false on failure
         */
        public function incr( $key, $value = 1 ) {
-               $section = new ProfileSection( __METHOD__ );
 
                list( $server, $conn ) = $this->getConnection( $key );
                if ( !$conn ) {
index be138f1..a8633e8 100644 (file)
@@ -226,7 +226,6 @@ class Article implements Page {
         * @since 1.21
         */
        protected function getContentObject() {
-               wfProfileIn( __METHOD__ );
 
                if ( $this->mPage->getID() === 0 ) {
                        # If this is a MediaWiki:x message, then load the messages
@@ -247,7 +246,6 @@ class Article implements Page {
                        $content = $this->mContentObject;
                }
 
-               wfProfileOut( __METHOD__ );
                return $content;
        }
 
@@ -344,12 +342,10 @@ class Article implements Page {
                        return $this->mContent;
                }
 
-               wfProfileIn( __METHOD__ );
 
                $content = $this->fetchContentObject();
 
                if ( !$content ) {
-                       wfProfileOut( __METHOD__ );
                        return false;
                }
 
@@ -357,7 +353,6 @@ class Article implements Page {
                $this->mContent = ContentHandler::getContentText( $content );
                ContentHandler::runLegacyHooks( 'ArticleAfterFetchContent', array( &$this, &$this->mContent ) );
 
-               wfProfileOut( __METHOD__ );
 
                return $this->mContent;
        }
@@ -379,7 +374,6 @@ class Article implements Page {
                        return $this->mContentObject;
                }
 
-               wfProfileIn( __METHOD__ );
 
                $this->mContentLoaded = true;
                $this->mContent = null;
@@ -397,7 +391,6 @@ class Article implements Page {
                                $this->mRevision = Revision::newFromId( $oldid );
                                if ( !$this->mRevision ) {
                                        wfDebug( __METHOD__ . " failed to retrieve specified revision, id $oldid\n" );
-                                       wfProfileOut( __METHOD__ );
                                        return false;
                                }
                        }
@@ -405,7 +398,6 @@ class Article implements Page {
                        if ( !$this->mPage->getLatest() ) {
                                wfDebug( __METHOD__ . " failed to find page data for title " .
                                        $this->getTitle()->getPrefixedText() . "\n" );
-                               wfProfileOut( __METHOD__ );
                                return false;
                        }
 
@@ -414,7 +406,6 @@ class Article implements Page {
                        if ( !$this->mRevision ) {
                                wfDebug( __METHOD__ . " failed to retrieve current page, rev_id " .
                                        $this->mPage->getLatest() . "\n" );
-                               wfProfileOut( __METHOD__ );
                                return false;
                        }
                }
@@ -430,7 +421,6 @@ class Article implements Page {
 
                Hooks::run( 'ArticleAfterFetchContentObject', array( &$this, &$this->mContentObject ) );
 
-               wfProfileOut( __METHOD__ );
 
                return $this->mContentObject;
        }
@@ -482,7 +472,6 @@ class Article implements Page {
        public function view() {
                global $wgUseFileCache, $wgUseETag, $wgDebugToolbar, $wgMaxRedirects;
 
-               wfProfileIn( __METHOD__ );
 
                # Get variables from query string
                # As side effect this will load the revision and update the title
@@ -495,7 +484,6 @@ class Article implements Page {
                $permErrors = $this->getTitle()->getUserPermissionsErrors( 'read', $user );
                if ( count( $permErrors ) ) {
                        wfDebug( __METHOD__ . ": denied on secondary read check\n" );
-                       wfProfileOut( __METHOD__ );
                        throw new PermissionsError( 'read', $permErrors );
                }
 
@@ -504,7 +492,6 @@ class Article implements Page {
                if ( $this->mRedirectUrl ) {
                        $outputPage->redirect( $this->mRedirectUrl );
                        wfDebug( __METHOD__ . ": redirecting due to oldid\n" );
-                       wfProfileOut( __METHOD__ );
 
                        return;
                }
@@ -513,7 +500,6 @@ class Article implements Page {
                if ( $this->getContext()->getRequest()->getCheck( 'diff' ) ) {
                        wfDebug( __METHOD__ . ": showing diff page\n" );
                        $this->showDiffPage();
-                       wfProfileOut( __METHOD__ );
 
                        return;
                }
@@ -568,7 +554,6 @@ class Article implements Page {
                        # Is it client cached?
                        if ( $outputPage->checkLastModified( $timestamp ) ) {
                                wfDebug( __METHOD__ . ": done 304\n" );
-                               wfProfileOut( __METHOD__ );
 
                                return;
                        # Try file cache
@@ -577,7 +562,6 @@ class Article implements Page {
                                # tell wgOut that output is taken care of
                                $outputPage->disable();
                                $this->mPage->doViewUpdates( $user, $oldid );
-                               wfProfileOut( __METHOD__ );
 
                                return;
                        }
@@ -610,7 +594,6 @@ class Article implements Page {
                                                wfDebug( __METHOD__ . ": showing missing article\n" );
                                                $this->showMissingArticle();
                                                $this->mPage->doViewUpdates( $user );
-                                               wfProfileOut( __METHOD__ );
                                                return;
                                        }
 
@@ -649,7 +632,6 @@ class Article implements Page {
 
                                                if ( !$this->showDeletedRevisionHeader() ) {
                                                        wfDebug( __METHOD__ . ": cannot view deleted revision\n" );
-                                                       wfProfileOut( __METHOD__ );
                                                        return;
                                                }
                                        }
@@ -696,7 +678,6 @@ class Article implements Page {
                                                        $outputPage->addWikiText( '<div class="errorbox">' . $errortext . '</div>' );
                                                }
                                                # Connection or timeout error
-                                               wfProfileOut( __METHOD__ );
                                                return;
                                        }
 
@@ -755,7 +736,6 @@ class Article implements Page {
 
                $outputPage->addModules( 'mediawiki.action.view.postEdit' );
 
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -1100,7 +1080,6 @@ class Article implements Page {
                        return false;
                }
 
-               wfProfileIn( __METHOD__ );
 
                // New page patrol: Get the timestamp of the oldest revison which
                // the revision table holds for the given page. Then we look
@@ -1110,7 +1089,6 @@ class Article implements Page {
 
                // Check for cached results
                if ( $cache->get( wfMemcKey( 'NotPatrollablePage', $this->getTitle()->getArticleID() ) ) ) {
-                       wfProfileOut( __METHOD__ );
                        return false;
                }
 
@@ -1119,7 +1097,6 @@ class Article implements Page {
                ) {
                        // The current revision is already older than what could be in the RC table
                        // 6h tolerance because the RC might not be cleaned out regularly
-                       wfProfileOut( __METHOD__ );
                        return false;
                }
 
@@ -1155,14 +1132,12 @@ class Article implements Page {
                        // Don't cache in case we can patrol as this could change
                        $cache->set( wfMemcKey( 'NotPatrollablePage', $this->getTitle()->getArticleID() ), '1' );
 
-                       wfProfileOut( __METHOD__ );
                        return false;
                }
 
                if ( $rc->getPerformer()->getName() == $user->getName() ) {
                        // Don't show a patrol link for own creations. If the user could
                        // patrol them, they already would be patrolled
-                       wfProfileOut( __METHOD__ );
                        return false;
                }
 
@@ -1192,7 +1167,6 @@ class Article implements Page {
                        '</div>'
                );
 
-               wfProfileOut( __METHOD__ );
                return true;
        }
 
index dcebe54..5c3d170 100644 (file)
@@ -557,7 +557,6 @@ class WikiPage implements Page, IDBAccessObject {
         * @return Revision|null
         */
        public function getOldestRevision() {
-               wfProfileIn( __METHOD__ );
 
                // Try using the slave database first, then try the master
                $continue = 2;
@@ -588,7 +587,6 @@ class WikiPage implements Page, IDBAccessObject {
                        }
                }
 
-               wfProfileOut( __METHOD__ );
                return $row ? Revision::newFromRow( $row ) : null;
        }
 
@@ -1055,7 +1053,6 @@ class WikiPage implements Page, IDBAccessObject {
         * @return array Array of authors, duplicates not removed
         */
        public function getLastNAuthors( $num, $revLatest = 0 ) {
-               wfProfileIn( __METHOD__ );
                // First try the slave
                // If that doesn't have the latest revision, try the master
                $continue = 2;
@@ -1076,7 +1073,6 @@ class WikiPage implements Page, IDBAccessObject {
                        );
 
                        if ( !$res ) {
-                               wfProfileOut( __METHOD__ );
                                return array();
                        }
 
@@ -1096,7 +1092,6 @@ class WikiPage implements Page, IDBAccessObject {
                        $authors[] = $row->rev_user_text;
                }
 
-               wfProfileOut( __METHOD__ );
                return $authors;
        }
 
@@ -1129,7 +1124,6 @@ class WikiPage implements Page, IDBAccessObject {
         * @return ParserOutput|bool ParserOutput or false if the revision was not found
         */
        public function getParserOutput( ParserOptions $parserOptions, $oldid = null ) {
-               wfProfileIn( __METHOD__ );
 
                $useParserCache = $this->isParserCacheUsed( $parserOptions, $oldid );
                wfDebug( __METHOD__ . ': using parser cache: ' . ( $useParserCache ? 'yes' : 'no' ) . "\n" );
@@ -1140,7 +1134,6 @@ class WikiPage implements Page, IDBAccessObject {
                if ( $useParserCache ) {
                        $parserOutput = ParserCache::singleton()->get( $this, $parserOptions );
                        if ( $parserOutput !== false ) {
-                               wfProfileOut( __METHOD__ );
                                return $parserOutput;
                        }
                }
@@ -1152,7 +1145,6 @@ class WikiPage implements Page, IDBAccessObject {
                $pool = new PoolWorkArticleView( $this, $parserOptions, $oldid, $useParserCache );
                $pool->execute();
 
-               wfProfileOut( __METHOD__ );
 
                return $pool->getParserOutput();
        }
@@ -1228,7 +1220,6 @@ class WikiPage implements Page, IDBAccessObject {
         * @return int The newly created page_id key, or false if the title already existed
         */
        public function insertOn( $dbw ) {
-               wfProfileIn( __METHOD__ );
 
                $page_id = $dbw->nextSequenceValue( 'page_page_id_seq' );
                $dbw->insert( 'page', array(
@@ -1251,7 +1242,6 @@ class WikiPage implements Page, IDBAccessObject {
                        $this->mId = $newid;
                        $this->mTitle->resetArticleID( $newid );
                }
-               wfProfileOut( __METHOD__ );
 
                return $affected ? $newid : false;
        }
@@ -1274,7 +1264,6 @@ class WikiPage implements Page, IDBAccessObject {
        ) {
                global $wgContentHandlerUseDB;
 
-               wfProfileIn( __METHOD__ );
 
                $content = $revision->getContent();
                $len = $content ? $content->getSize() : 0;
@@ -1317,7 +1306,6 @@ class WikiPage implements Page, IDBAccessObject {
                                                                                                        $this->mLatest, $revision->getContentModel() );
                }
 
-               wfProfileOut( __METHOD__ );
                return $result;
        }
 
@@ -1342,7 +1330,6 @@ class WikiPage implements Page, IDBAccessObject {
                        return true;
                }
 
-               wfProfileIn( __METHOD__ );
                if ( $isRedirect ) {
                        $this->insertRedirectEntry( $redirectTitle );
                } else {
@@ -1354,7 +1341,6 @@ class WikiPage implements Page, IDBAccessObject {
                if ( $this->getTitle()->getNamespace() == NS_FILE ) {
                        RepoGroup::singleton()->getLocalRepo()->invalidateImageRedirect( $this->getTitle() );
                }
-               wfProfileOut( __METHOD__ );
 
                return ( $dbw->affectedRows() != 0 );
        }
@@ -1370,7 +1356,6 @@ class WikiPage implements Page, IDBAccessObject {
         * @return bool
         */
        public function updateIfNewerOn( $dbw, $revision ) {
-               wfProfileIn( __METHOD__ );
 
                $row = $dbw->selectRow(
                        array( 'revision', 'page' ),
@@ -1382,7 +1367,6 @@ class WikiPage implements Page, IDBAccessObject {
 
                if ( $row ) {
                        if ( wfTimestamp( TS_MW, $row->rev_timestamp ) >= $revision->getTimestamp() ) {
-                               wfProfileOut( __METHOD__ );
                                return false;
                        }
                        $prev = $row->rev_id;
@@ -1395,7 +1379,6 @@ class WikiPage implements Page, IDBAccessObject {
 
                $ret = $this->updateRevisionOn( $dbw, $revision, $prev, $lastRevIsRedirect );
 
-               wfProfileOut( __METHOD__ );
                return $ret;
        }
 
@@ -1514,7 +1497,6 @@ class WikiPage implements Page, IDBAccessObject {
         */
        public function replaceSectionContent( $sectionId, Content $sectionContent, $sectionTitle = '',
                $edittime = null ) {
-               wfProfileIn( __METHOD__ );
 
                $baseRevId = null;
                if ( $edittime && $sectionId !== 'new' ) {
@@ -1525,7 +1507,6 @@ class WikiPage implements Page, IDBAccessObject {
                        }
                }
 
-               wfProfileOut( __METHOD__ );
                return $this->replaceSectionAtRev( $sectionId, $sectionContent, $sectionTitle, $baseRevId );
        }
 
@@ -1545,14 +1526,12 @@ class WikiPage implements Page, IDBAccessObject {
        public function replaceSectionAtRev( $sectionId, Content $sectionContent,
                $sectionTitle = '', $baseRevId = null
        ) {
-               wfProfileIn( __METHOD__ );
 
                if ( strval( $sectionId ) === '' ) {
                        // Whole-page edit; let the whole text through
                        $newContent = $sectionContent;
                } else {
                        if ( !$this->supportsSections() ) {
-                               wfProfileOut( __METHOD__ );
                                throw new MWException( "sections not supported for content model " .
                                        $this->getContentHandler()->getModelID() );
                        }
@@ -1568,7 +1547,6 @@ class WikiPage implements Page, IDBAccessObject {
                                if ( !$rev ) {
                                        wfDebug( __METHOD__ . " asked for bogus section (page: " .
                                                $this->getId() . "; section: $sectionId)\n" );
-                                       wfProfileOut( __METHOD__ );
                                        return null;
                                }
 
@@ -1577,14 +1555,12 @@ class WikiPage implements Page, IDBAccessObject {
 
                        if ( !$oldContent ) {
                                wfDebug( __METHOD__ . ": no page text\n" );
-                               wfProfileOut( __METHOD__ );
                                return null;
                        }
 
                        $newContent = $oldContent->replaceSection( $sectionId, $sectionContent, $sectionTitle );
                }
 
-               wfProfileOut( __METHOD__ );
                return $newContent;
        }
 
@@ -1726,10 +1702,8 @@ class WikiPage implements Page, IDBAccessObject {
                        throw new MWException( 'Something is trying to edit an article with an empty title' );
                }
 
-               wfProfileIn( __METHOD__ );
 
                if ( !$content->getContentHandler()->canBeUsedOn( $this->getTitle() ) ) {
-                       wfProfileOut( __METHOD__ );
                        return Status::newFatal( 'content-not-allowed-here',
                                ContentHandler::getLocalizedName( $content->getModel() ),
                                $this->getTitle()->getPrefixedText() );
@@ -1758,7 +1732,6 @@ class WikiPage implements Page, IDBAccessObject {
                                $status->fatal( 'edit-hook-aborted' );
                        }
 
-                       wfProfileOut( __METHOD__ );
                        return $status;
                }
 
@@ -1805,11 +1778,9 @@ class WikiPage implements Page, IDBAccessObject {
                                wfDebug( __METHOD__ . ": EDIT_UPDATE specified but article doesn't exist\n" );
                                $status->fatal( 'edit-gone-missing' );
 
-                               wfProfileOut( __METHOD__ );
                                return $status;
                        } elseif ( !$old_content ) {
                                // Sanity check for bug 37225
-                               wfProfileOut( __METHOD__ );
                                throw new MWException( "Could not find text for current revision {$oldid}." );
                        }
 
@@ -1840,7 +1811,6 @@ class WikiPage implements Page, IDBAccessObject {
                                        if ( !$status->isOK() ) {
                                                $dbw->rollback( __METHOD__ );
 
-                                               wfProfileOut( __METHOD__ );
                                                return $status;
                                        }
                                        $revisionId = $revision->insertOn( $dbw );
@@ -1856,7 +1826,6 @@ class WikiPage implements Page, IDBAccessObject {
 
                                                $dbw->rollback( __METHOD__ );
 
-                                               wfProfileOut( __METHOD__ );
                                                return $status;
                                        }
 
@@ -1921,7 +1890,6 @@ class WikiPage implements Page, IDBAccessObject {
                                if ( !$status->isOK() ) {
                                        $dbw->rollback( __METHOD__ );
 
-                                       wfProfileOut( __METHOD__ );
                                        return $status;
                                }
 
@@ -1935,7 +1903,6 @@ class WikiPage implements Page, IDBAccessObject {
                                        $dbw->rollback( __METHOD__ );
                                        $status->fatal( 'edit-already-exists' );
 
-                                       wfProfileOut( __METHOD__ );
                                        return $status;
                                }
 
@@ -2018,7 +1985,6 @@ class WikiPage implements Page, IDBAccessObject {
                        $user->addAutopromoteOnceGroups( 'onEdit' );
                } );
 
-               wfProfileOut( __METHOD__ );
                return $status;
        }
 
@@ -2166,7 +2132,6 @@ class WikiPage implements Page, IDBAccessObject {
        public function doEditUpdates( Revision $revision, User $user, array $options = array() ) {
                global $wgEnableParserCache;
 
-               wfProfileIn( __METHOD__ );
 
                $options += array(
                        'changed' => true,
@@ -2214,7 +2179,6 @@ class WikiPage implements Page, IDBAccessObject {
                }
 
                if ( !$this->exists() ) {
-                       wfProfileOut( __METHOD__ );
                        return;
                }
 
@@ -2279,7 +2243,6 @@ class WikiPage implements Page, IDBAccessObject {
                        self::onArticleEdit( $this->mTitle );
                }
 
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -2315,7 +2278,6 @@ class WikiPage implements Page, IDBAccessObject {
        public function doQuickEditContent( Content $content, User $user, $comment = '', $minor = false,
                $serialFormat = null
        ) {
-               wfProfileIn( __METHOD__ );
 
                $serialized = $content->serialize( $serialFormat );
 
@@ -2335,7 +2297,6 @@ class WikiPage implements Page, IDBAccessObject {
 
                Hooks::run( 'NewRevisionFromEditComplete', array( $this, $revision, false, $user ) );
 
-               wfProfileOut( __METHOD__ );
        }
 
        /**
index a95bbfe..2b495b1 100644 (file)
@@ -309,15 +309,12 @@ class CoreParserFunctions {
         * @return string
         */
        public static function gender( $parser, $username ) {
-               wfProfileIn( __METHOD__ );
                $forms = array_slice( func_get_args(), 2 );
 
                // Some shortcuts to avoid loading user data unnecessarily
                if ( count( $forms ) === 0 ) {
-                       wfProfileOut( __METHOD__ );
                        return '';
                } elseif ( count( $forms ) === 1 ) {
-                       wfProfileOut( __METHOD__ );
                        return $forms[0];
                }
 
@@ -341,7 +338,6 @@ class CoreParserFunctions {
                        $gender = GenderCache::singleton()->getGenderOf( $parser->getOptions()->getUser(), __METHOD__ );
                }
                $ret = $parser->getFunctionLang()->gender( $gender, $forms );
-               wfProfileOut( __METHOD__ );
                return $ret;
        }
 
index 0121072..5b6209e 100644 (file)
@@ -229,7 +229,6 @@ class LinkHolderArray {
         * @return string
         */
        public function makeHolder( $nt, $text = '', $query = array(), $trail = '', $prefix = '' ) {
-               wfProfileIn( __METHOD__ );
                if ( !is_object( $nt ) ) {
                        # Fail gracefully
                        $retVal = "<!-- ERROR -->{$prefix}{$text}{$trail}";
@@ -259,7 +258,6 @@ class LinkHolderArray {
                        }
                        $this->size++;
                }
-               wfProfileOut( __METHOD__ );
                return $retVal;
        }
 
@@ -269,12 +267,10 @@ class LinkHolderArray {
         * @param string $text
         */
        public function replace( &$text ) {
-               wfProfileIn( __METHOD__ );
 
                $this->replaceInternal( $text );
                $this->replaceInterwiki( $text );
 
-               wfProfileOut( __METHOD__ );
 
        }
 
@@ -287,7 +283,6 @@ class LinkHolderArray {
                        return;
                }
 
-               wfProfileIn( __METHOD__ );
                global $wgContLang, $wgContentHandlerUseDB;
 
                $colours = array();
@@ -435,7 +430,6 @@ class LinkHolderArray {
                );
 
                wfProfileOut( __METHOD__ . '-replace' );
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -447,7 +441,6 @@ class LinkHolderArray {
                        return;
                }
 
-               wfProfileIn( __METHOD__ );
                # Make interwiki link HTML
                $output = $this->parent->getOutput();
                $replacePairs = array();
@@ -461,7 +454,6 @@ class LinkHolderArray {
                        '/<!--IWLINK (.*?)-->/',
                        $replacer->cb(),
                        $text );
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -642,14 +634,12 @@ class LinkHolderArray {
         * @return string
         */
        public function replaceText( $text ) {
-               wfProfileIn( __METHOD__ );
 
                $text = preg_replace_callback(
                        '/<!--(LINK|IWLINK) (.*?)-->/',
                        array( &$this, 'replaceTextCallback' ),
                        $text );
 
-               wfProfileOut( __METHOD__ );
                return $text;
        }
 
index 6c62302..d446ccf 100644 (file)
@@ -195,7 +195,6 @@ class MWTidy {
         */
        private static function externalClean( $text, $stderr = false, &$retval = null ) {
                global $wgTidyConf, $wgTidyBin, $wgTidyOpts;
-               wfProfileIn( __METHOD__ );
 
                $cleansource = '';
                $opts = ' -utf8';
@@ -247,7 +246,6 @@ class MWTidy {
                        $cleansource = null;
                }
 
-               wfProfileOut( __METHOD__ );
                return $cleansource;
        }
 
@@ -262,7 +260,6 @@ class MWTidy {
         */
        private static function phpClean( $text, $stderr = false, &$retval = null ) {
                global $wgTidyConf, $wgDebugTidy;
-               wfProfileIn( __METHOD__ );
 
                if ( ( !wfIsHHVM() && !class_exists( 'tidy' ) ) ||
                        ( wfIsHHVM() && !function_exists( 'tidy_repair_string' ) )
@@ -270,7 +267,6 @@ class MWTidy {
                        wfWarn( "Unable to load internal tidy class." );
                        $retval = -1;
 
-                       wfProfileOut( __METHOD__ );
                        return null;
                }
 
@@ -279,8 +275,6 @@ class MWTidy {
 
                if ( $stderr ) {
                        $retval = $tidy->getStatus();
-
-                       wfProfileOut( __METHOD__ );
                        return $tidy->errorBuffer;
                }
 
@@ -299,7 +293,6 @@ class MWTidy {
                        }
                }
 
-               wfProfileOut( __METHOD__ );
                return $cleansource;
        }
 
@@ -316,7 +309,7 @@ class MWTidy {
         */
        private static function hhvmClean( $text, &$retval ) {
                global $wgTidyConf;
-               wfProfileIn( __METHOD__ );
+
                $cleansource = tidy_repair_string( $text, $wgTidyConf, 'utf8' );
                if ( $cleansource === false ) {
                        $cleansource = null;
@@ -324,7 +317,7 @@ class MWTidy {
                } else {
                        $retval = 0;
                }
-               wfProfileOut( __METHOD__ );
+
                return $cleansource;
        }
 }
index b7f8cf2..3027ab6 100644 (file)
@@ -299,14 +299,12 @@ class Parser {
                }
                $this->mFirstCall = false;
 
-               wfProfileIn( __METHOD__ );
 
                CoreParserFunctions::register( $this );
                CoreTagHooks::register( $this );
                $this->initialiseVariables();
 
                Hooks::run( 'ParserFirstCallInit', array( &$this ) );
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -315,7 +313,6 @@ class Parser {
         * @private
         */
        public function clearState() {
-               wfProfileIn( __METHOD__ );
                if ( $this->mFirstCall ) {
                        $this->firstCallInit();
                }
@@ -374,7 +371,6 @@ class Parser {
                $this->mProfiler = new SectionProfiler();
 
                Hooks::run( 'ParserClearState', array( &$this ) );
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -399,7 +395,6 @@ class Parser {
 
                global $wgShowHostnames;
                $fname = __METHOD__ . '-' . wfGetCaller();
-               wfProfileIn( __METHOD__ );
                wfProfileIn( $fname );
 
                if ( $clearState ) {
@@ -562,7 +557,6 @@ class Parser {
                $this->mInputSize = false;
                $this->currentRevisionCache = null;
                wfProfileOut( $fname );
-               wfProfileOut( __METHOD__ );
 
                return $this->mOutput;
        }
@@ -590,11 +584,9 @@ class Parser {
         * @return string UNSAFE half-parsed HTML
         */
        public function recursiveTagParse( $text, $frame = false ) {
-               wfProfileIn( __METHOD__ );
                Hooks::run( 'ParserBeforeStrip', array( &$this, &$text, &$this->mStripState ) );
                Hooks::run( 'ParserAfterStrip', array( &$this, &$text, &$this->mStripState ) );
                $text = $this->internalParse( $text, false, $frame );
-               wfProfileOut( __METHOD__ );
                return $text;
        }
 
@@ -616,10 +608,8 @@ class Parser {
         * @return string Fully parsed HTML
         */
        public function recursiveTagParseFully( $text, $frame = false ) {
-               wfProfileIn( __METHOD__ );
                $text = $this->recursiveTagParse( $text, $frame );
                $text = $this->internalParseHalfParsed( $text, false );
-               wfProfileOut( __METHOD__ );
                return $text;
        }
 
@@ -637,7 +627,6 @@ class Parser {
        public function preprocess( $text, Title $title = null,
                ParserOptions $options, $revid = null, $frame = false
        ) {
-               wfProfileIn( __METHOD__ );
                $magicScopeVariable = $this->lock();
                $this->startParse( $title, $options, self::OT_PREPROCESS, true );
                if ( $revid !== null ) {
@@ -647,7 +636,6 @@ class Parser {
                Hooks::run( 'ParserAfterStrip', array( &$this, &$text, &$this->mStripState ) );
                $text = $this->replaceVariables( $text, $frame );
                $text = $this->mStripState->unstripBoth( $text );
-               wfProfileOut( __METHOD__ );
                return $text;
        }
 
@@ -661,10 +649,8 @@ class Parser {
         * @since 1.19
         */
        public function recursivePreprocess( $text, $frame = false ) {
-               wfProfileIn( __METHOD__ );
                $text = $this->replaceVariables( $text, $frame );
                $text = $this->mStripState->unstripBoth( $text );
-               wfProfileOut( __METHOD__ );
                return $text;
        }
 
@@ -1019,7 +1005,6 @@ class Parser {
         * @return string
         */
        public function doTableStuff( $text ) {
-               wfProfileIn( __METHOD__ );
 
                $lines = StringUtils::explode( "\n", $text );
                $out = '';
@@ -1206,7 +1191,6 @@ class Parser {
                        $out = '';
                }
 
-               wfProfileOut( __METHOD__ );
 
                return $out;
        }
@@ -1224,13 +1208,11 @@ class Parser {
         * @return string
         */
        public function internalParse( $text, $isMain = true, $frame = false ) {
-               wfProfileIn( __METHOD__ );
 
                $origText = $text;
 
                # Hook to suspend the parser in this state
                if ( !Hooks::run( 'ParserBeforeInternalParse', array( &$this, &$text, &$this->mStripState ) ) ) {
-                       wfProfileOut( __METHOD__ );
                        return $text;
                }
 
@@ -1281,7 +1263,6 @@ class Parser {
                $text = $this->doMagicLinks( $text );
                $text = $this->formatHeadings( $text, $origText, $isMain );
 
-               wfProfileOut( __METHOD__ );
                return $text;
        }
 
@@ -1392,7 +1373,6 @@ class Parser {
         * @return string
         */
        public function doMagicLinks( $text ) {
-               wfProfileIn( __METHOD__ );
                $prots = wfUrlProtocolsWithoutProtRel();
                $urlChar = self::EXT_LINK_URL_CLASS;
                $space = self::SPACE_NOT_NL; #  non-newline space
@@ -1411,7 +1391,6 @@ class Parser {
                                        [0-9Xx]                 # check digit
                                )\b
                        )!xu", array( &$this, 'magicLinkCallback' ), $text );
-               wfProfileOut( __METHOD__ );
                return $text;
        }
 
@@ -1476,7 +1455,6 @@ class Parser {
         * @private
         */
        public function makeFreeExternalLink( $url ) {
-               wfProfileIn( __METHOD__ );
 
                $trail = '';
 
@@ -1530,7 +1508,6 @@ class Parser {
                        $pasteurized = self::normalizeLinkUrl( $url );
                        $this->mOutput->addExternalLink( $pasteurized );
                }
-               wfProfileOut( __METHOD__ );
                return $text . $trail;
        }
 
@@ -1544,12 +1521,10 @@ class Parser {
         * @return string
         */
        public function doHeadings( $text ) {
-               wfProfileIn( __METHOD__ );
                for ( $i = 6; $i >= 1; --$i ) {
                        $h = str_repeat( '=', $i );
                        $text = preg_replace( "/^$h(.+)$h\\s*$/m", "<h$i>\\1</h$i>", $text );
                }
-               wfProfileOut( __METHOD__ );
                return $text;
        }
 
@@ -1562,14 +1537,12 @@ class Parser {
         * @return string The altered text
         */
        public function doAllQuotes( $text ) {
-               wfProfileIn( __METHOD__ );
                $outtext = '';
                $lines = StringUtils::explode( "\n", $text );
                foreach ( $lines as $line ) {
                        $outtext .= $this->doQuotes( $line ) . "\n";
                }
                $outtext = substr( $outtext, 0, -1 );
-               wfProfileOut( __METHOD__ );
                return $outtext;
        }
 
@@ -1771,11 +1744,9 @@ class Parser {
         * @return string
         */
        public function replaceExternalLinks( $text ) {
-               wfProfileIn( __METHOD__ );
 
                $bits = preg_split( $this->mExtLinkBracketedRegex, $text, -1, PREG_SPLIT_DELIM_CAPTURE );
                if ( $bits === false ) {
-                       wfProfileOut( __METHOD__ );
                        throw new MWException( "PCRE needs to be compiled with "
                                . "--enable-unicode-properties in order for MediaWiki to function" );
                }
@@ -1839,7 +1810,6 @@ class Parser {
                        $this->mOutput->addExternalLink( $pasteurized );
                }
 
-               wfProfileOut( __METHOD__ );
                return $s;
        }
 
@@ -2037,7 +2007,6 @@ class Parser {
         */
        public function replaceInternalLinks2( &$s ) {
                global $wgExtraInterlanguageLinkPrefixes;
-               wfProfileIn( __METHOD__ );
 
                wfProfileIn( __METHOD__ . '-setup' );
                static $tc = false, $e1, $e1_img;
@@ -2072,7 +2041,6 @@ class Parser {
 
                if ( is_null( $this->mTitle ) ) {
                        wfProfileOut( __METHOD__ . '-setup' );
-                       wfProfileOut( __METHOD__ );
                        throw new MWException( __METHOD__ . ": \$this->mTitle is null\n" );
                }
                $nottalk = !$this->mTitle->isTalkPage();
@@ -2369,7 +2337,6 @@ class Parser {
                        }
                        wfProfileOut( __METHOD__ . "-always_known" );
                }
-               wfProfileOut( __METHOD__ );
                return $holders;
        }
 
@@ -2568,7 +2535,6 @@ class Parser {
         * @return string The lists rendered as HTML
         */
        public function doBlockLevels( $text, $linestart ) {
-               wfProfileIn( __METHOD__ );
 
                # Parsing through the text line by line.  The main thing
                # happening here is handling of block-level elements p, pre,
@@ -2771,7 +2737,6 @@ class Parser {
                        $this->mLastSection = '';
                }
 
-               wfProfileOut( __METHOD__ );
                return $output;
        }
 
@@ -2786,12 +2751,10 @@ class Parser {
         * @return string The position of the ':', or false if none found
         */
        public function findColonNoLinks( $str, &$before, &$after ) {
-               wfProfileIn( __METHOD__ );
 
                $pos = strpos( $str, ':' );
                if ( $pos === false ) {
                        # Nothing to find!
-                       wfProfileOut( __METHOD__ );
                        return false;
                }
 
@@ -2800,7 +2763,6 @@ class Parser {
                        # Easy; no tag nesting to worry about
                        $before = substr( $str, 0, $pos );
                        $after = substr( $str, $pos + 1 );
-                       wfProfileOut( __METHOD__ );
                        return $pos;
                }
 
@@ -2824,7 +2786,6 @@ class Parser {
                                                # We found it!
                                                $before = substr( $str, 0, $i );
                                                $after = substr( $str, $i + 1 );
-                                               wfProfileOut( __METHOD__ );
                                                return $i;
                                        }
                                        # Embedded in a tag; don't break it.
@@ -2834,7 +2795,6 @@ class Parser {
                                        $colon = strpos( $str, ':', $i );
                                        if ( $colon === false ) {
                                                # Nothing else interesting
-                                               wfProfileOut( __METHOD__ );
                                                return false;
                                        }
                                        $lt = strpos( $str, '<', $i );
@@ -2843,7 +2803,6 @@ class Parser {
                                                        # We found it!
                                                        $before = substr( $str, 0, $colon );
                                                        $after = substr( $str, $colon + 1 );
-                                                       wfProfileOut( __METHOD__ );
                                                        return $i;
                                                }
                                        }
@@ -2894,7 +2853,6 @@ class Parser {
                                        $stack--;
                                        if ( $stack < 0 ) {
                                                wfDebug( __METHOD__ . ": Invalid input; too many close tags\n" );
-                                               wfProfileOut( __METHOD__ );
                                                return false;
                                        }
                                        $state = self::COLON_STATE_TEXT;
@@ -2929,16 +2887,13 @@ class Parser {
                                }
                                break;
                        default:
-                               wfProfileOut( __METHOD__ );
                                throw new MWException( "State machine error in " . __METHOD__ );
                        }
                }
                if ( $stack > 0 ) {
                        wfDebug( __METHOD__ . ": Invalid input; not enough close tags (stack $stack, state $state)\n" );
-                       wfProfileOut( __METHOD__ );
                        return false;
                }
-               wfProfileOut( __METHOD__ );
                return false;
        }
 
@@ -3306,13 +3261,11 @@ class Parser {
         * @private
         */
        public function initialiseVariables() {
-               wfProfileIn( __METHOD__ );
                $variableIDs = MagicWord::getVariableIDs();
                $substIDs = MagicWord::getSubstIDs();
 
                $this->mVariables = new MagicWordArray( $variableIDs );
                $this->mSubstWords = new MagicWordArray( $substIDs );
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -3387,7 +3340,6 @@ class Parser {
                if ( strlen( $text ) < 1 || strlen( $text ) > $this->mOptions->getMaxIncludeSize() ) {
                        return $text;
                }
-               wfProfileIn( __METHOD__ );
 
                if ( $frame === false ) {
                        $frame = $this->getPreprocessor()->newFrame();
@@ -3401,7 +3353,6 @@ class Parser {
                $flags = $argsOnly ? PPFrame::NO_TEMPLATES : 0;
                $text = $frame->expand( $dom, $flags );
 
-               wfProfileOut( __METHOD__ );
                return $text;
        }
 
@@ -3479,7 +3430,6 @@ class Parser {
         * @return string The text of the template
         */
        public function braceSubstitution( $piece, $frame ) {
-               wfProfileIn( __METHOD__ );
                wfProfileIn( __METHOD__ . '-setup' );
 
                // Flags
@@ -3592,7 +3542,6 @@ class Parser {
                                        $result = $this->callParserFunction( $frame, $func, $funcArgs );
                                } catch ( Exception $ex ) {
                                        wfProfileOut( __METHOD__ . '-pfunc' );
-                                       wfProfileOut( __METHOD__ );
                                        throw $ex;
                                }
 
@@ -3721,7 +3670,6 @@ class Parser {
                        if ( $profileSection ) {
                                $this->mProfiler->scopedProfileOut( $profileSection );
                        }
-                       wfProfileOut( __METHOD__ );
                        return array( 'object' => $text );
                }
 
@@ -3787,7 +3735,6 @@ class Parser {
                        $ret = array( 'text' => $text );
                }
 
-               wfProfileOut( __METHOD__ );
                return $ret;
        }
 
@@ -3813,7 +3760,6 @@ class Parser {
        public function callParserFunction( $frame, $function, array $args = array() ) {
                global $wgContLang;
 
-               wfProfileIn( __METHOD__ );
 
                # Case sensitive functions
                if ( isset( $this->mFunctionSynonyms[1][$function] ) ) {
@@ -3824,7 +3770,6 @@ class Parser {
                        if ( isset( $this->mFunctionSynonyms[0][$function] ) ) {
                                $function = $this->mFunctionSynonyms[0][$function];
                        } else {
-                               wfProfileOut( __METHOD__ );
                                return array( 'found' => false );
                        }
                }
@@ -3835,7 +3780,6 @@ class Parser {
                # Workaround for PHP bug 35229 and similar
                if ( !is_callable( $callback ) ) {
                        wfProfileOut( __METHOD__ . '-pfunc-' . $function );
-                       wfProfileOut( __METHOD__ );
                        throw new MWException( "Tag hook for $function is not callable\n" );
                }
 
@@ -3901,7 +3845,6 @@ class Parser {
                        $result['isChildObj'] = true;
                }
                wfProfileOut( __METHOD__ . '-pfunc-' . $function );
-               wfProfileOut( __METHOD__ );
 
                return $result;
        }
@@ -4231,7 +4174,6 @@ class Parser {
         * @return array
         */
        public function argSubstitution( $piece, $frame ) {
-               wfProfileIn( __METHOD__ );
 
                $error = false;
                $parts = $piece['parts'];
@@ -4266,7 +4208,6 @@ class Parser {
                        $ret = array( 'text' => $text );
                }
 
-               wfProfileOut( __METHOD__ );
                return $ret;
        }
 
@@ -4397,7 +4338,6 @@ class Parser {
         * @return string
         */
        public function doDoubleUnderscore( $text ) {
-               wfProfileIn( __METHOD__ );
 
                # The position of __TOC__ needs to be recorded
                $mw = MagicWord::get( 'toc' );
@@ -4445,7 +4385,6 @@ class Parser {
                        $this->mOutput->setProperty( $key, '' );
                }
 
-               wfProfileOut( __METHOD__ );
                return $text;
        }
 
@@ -5151,7 +5090,6 @@ class Parser {
                }
                $executing = true;
 
-               wfProfileIn( __METHOD__ );
                if ( !$title ) {
                        global $wgTitle;
                        $title = $wgTitle;
@@ -5160,7 +5098,6 @@ class Parser {
                $text = $this->preprocess( $text, $title, $options );
 
                $executing = false;
-               wfProfileOut( __METHOD__ );
                return $text;
        }
 
@@ -5387,7 +5324,6 @@ class Parser {
         * @return string HTML
         */
        public function renderImageGallery( $text, $params ) {
-               wfProfileIn( __METHOD__ );
 
                $mode = false;
                if ( isset( $params['mode'] ) ) {
@@ -5539,7 +5475,6 @@ class Parser {
                }
                $html = $ig->toHTML();
                Hooks::run( 'AfterParserFetchFileAndTitle', array( $this, $ig, &$html ) );
-               wfProfileOut( __METHOD__ );
                return $html;
        }
 
@@ -6111,7 +6046,6 @@ class Parser {
         */
        public function getRevisionTimestamp() {
                if ( is_null( $this->mRevisionTimestamp ) ) {
-                       wfProfileIn( __METHOD__ );
 
                        global $wgContLang;
 
@@ -6126,7 +6060,6 @@ class Parser {
                        # it needs to be consistent for all visitors.
                        $this->mRevisionTimestamp = $wgContLang->userAdjust( $timestamp, '' );
 
-                       wfProfileOut( __METHOD__ );
                }
                return $this->mRevisionTimestamp;
        }
@@ -6381,14 +6314,12 @@ class Parser {
         * @return array
         */
        public function serializeHalfParsedText( $text ) {
-               wfProfileIn( __METHOD__ );
                $data = array(
                        'text' => $text,
                        'version' => self::HALF_PARSED_VERSION,
                        'stripState' => $this->mStripState->getSubState( $text ),
                        'linkHolders' => $this->mLinkHolders->getSubArray( $text )
                );
-               wfProfileOut( __METHOD__ );
                return $data;
        }
 
index 7952300..ad131f4 100644 (file)
@@ -184,12 +184,10 @@ class ParserCache {
         */
        public function get( $article, $popts, $useOutdated = false ) {
                global $wgCacheEpoch;
-               wfProfileIn( __METHOD__ );
 
                $canCache = $article->checkTouched();
                if ( !$canCache ) {
                        // It's a redirect now
-                       wfProfileOut( __METHOD__ );
                        return false;
                }
 
@@ -198,7 +196,6 @@ class ParserCache {
                $parserOutputKey = $this->getKey( $article, $popts, $useOutdated );
                if ( $parserOutputKey === false ) {
                        wfIncrStats( 'pcache_miss_absent' );
-                       wfProfileOut( __METHOD__ );
                        return false;
                }
 
@@ -206,7 +203,6 @@ class ParserCache {
                if ( !$value ) {
                        wfDebug( "ParserOutput cache miss.\n" );
                        wfIncrStats( "pcache_miss_absent" );
-                       wfProfileOut( __METHOD__ );
                        return false;
                }
 
@@ -233,7 +229,6 @@ class ParserCache {
                        wfIncrStats( "pcache_hit" );
                }
 
-               wfProfileOut( __METHOD__ );
                return $value;
        }
 
index ddeb906..ffcde30 100644 (file)
@@ -639,7 +639,6 @@ class ParserOptions {
                        $wgCleanSignatures, $wgExternalLinkTarget, $wgExpensiveParserFunctionLimit,
                        $wgMaxGeneratedPPNodeCount, $wgDisableLangConversion, $wgDisableTitleConversion;
 
-               wfProfileIn( __METHOD__ );
 
                // *UPDATE* ParserOptions::matches() if any of this changes as needed
                $this->mInterwikiMagic = $wgInterwikiMagic;
@@ -664,7 +663,6 @@ class ParserOptions {
                $this->mStubThreshold = $user->getStubThreshold();
                $this->mUserLang = $lang;
 
-               wfProfileOut( __METHOD__ );
        }
 
        /**
index 1a2be5f..83f0f69 100644 (file)
@@ -73,7 +73,6 @@ class ParserOutput extends CacheTime {
        }
 
        public function getText() {
-               wfProfileIn( __METHOD__ );
                $text = $this->mText;
                if ( $this->mEditSectionTokens ) {
                        $text = preg_replace_callback(
@@ -111,7 +110,6 @@ class ParserOutput extends CacheTime {
                                $text
                        );
                }
-               wfProfileOut( __METHOD__ );
                return $text;
        }
 
index 7e0405c..e642c96 100644 (file)
@@ -150,7 +150,6 @@ class Preprocessor_DOM implements Preprocessor {
         * @return PPNode_DOM
         */
        public function preprocessToObj( $text, $flags = 0 ) {
-               wfProfileIn( __METHOD__ );
                global $wgMemc, $wgPreprocessorCacheThreshold;
 
                $xml = false;
@@ -189,7 +188,6 @@ class Preprocessor_DOM implements Preprocessor {
                        if ( $cacheable ) {
                                wfProfileOut( __METHOD__ . '-cacheable' );
                        }
-                       wfProfileOut( __METHOD__ );
                        throw new MWException( __METHOD__ . ': generated node count limit exceeded' );
                }
 
@@ -214,7 +212,6 @@ class Preprocessor_DOM implements Preprocessor {
                        wfProfileOut( __METHOD__ . '-cacheable' );
                }
 
-               wfProfileOut( __METHOD__ );
 
                if ( !$result ) {
                        throw new MWException( __METHOD__ . ' generated invalid XML' );
@@ -228,7 +225,6 @@ class Preprocessor_DOM implements Preprocessor {
         * @return string
         */
        public function preprocessToXml( $text, $flags = 0 ) {
-               wfProfileIn( __METHOD__ );
                $rules = array(
                        '{' => array(
                                'end' => '}',
@@ -765,7 +761,6 @@ class Preprocessor_DOM implements Preprocessor {
                $stack->rootAccum .= '</root>';
                $xml = $stack->rootAccum;
 
-               wfProfileOut( __METHOD__ );
 
                return $xml;
        }
@@ -1102,7 +1097,6 @@ class PPFrame_DOM implements PPFrame {
                        );
                        return '<span class="error">Expansion depth limit exceeded</span>';
                }
-               wfProfileIn( __METHOD__ );
                ++$expansionDepth;
                if ( $expansionDepth > $this->parser->mHighestExpansionDepth ) {
                        $this->parser->mHighestExpansionDepth = $expansionDepth;
@@ -1291,7 +1285,6 @@ class PPFrame_DOM implements PPFrame {
                                        $newIterator = $contextNode->childNodes;
                                }
                        } else {
-                               wfProfileOut( __METHOD__ );
                                throw new MWException( __METHOD__ . ': Invalid parameter type' );
                        }
 
@@ -1315,7 +1308,6 @@ class PPFrame_DOM implements PPFrame {
                        }
                }
                --$expansionDepth;
-               wfProfileOut( __METHOD__ );
                return $outStack[0];
        }
 
index b4b14dc..4de2fed 100644 (file)
@@ -112,7 +112,6 @@ class Preprocessor_Hash implements Preprocessor {
         * @return PPNode_Hash_Tree
         */
        public function preprocessToObj( $text, $flags = 0 ) {
-               wfProfileIn( __METHOD__ );
 
                // Check cache.
                global $wgMemc, $wgPreprocessorCacheThreshold;
@@ -133,7 +132,6 @@ class Preprocessor_Hash implements Preprocessor {
                                        wfDebugLog( "Preprocessor",
                                                "Loaded preprocessor hash from memcached (key $cacheKey)" );
                                        wfProfileOut( __METHOD__ . '-cacheable' );
-                                       wfProfileOut( __METHOD__ );
                                        return $hash;
                                }
                        }
@@ -640,7 +638,6 @@ class Preprocessor_Hash implements Preprocessor {
                                                                        wfProfileOut( __METHOD__ . '-cache-miss' );
                                                                        wfProfileOut( __METHOD__ . '-cacheable' );
                                                                }
-                                                               wfProfileOut( __METHOD__ );
                                                                throw new MWException( __METHOD__ . ': eqpos not found' );
                                                        }
                                                        if ( $node->name !== 'equals' ) {
@@ -648,7 +645,6 @@ class Preprocessor_Hash implements Preprocessor {
                                                                        wfProfileOut( __METHOD__ . '-cache-miss' );
                                                                        wfProfileOut( __METHOD__ . '-cacheable' );
                                                                }
-                                                               wfProfileOut( __METHOD__ );
                                                                throw new MWException( __METHOD__ . ': eqpos is not equals' );
                                                        }
                                                        $equalsNode = $node;
@@ -753,7 +749,6 @@ class Preprocessor_Hash implements Preprocessor {
                        wfDebugLog( "Preprocessor", "Saved preprocessor Hash to memcached (key $cacheKey)" );
                }
 
-               wfProfileOut( __METHOD__ );
                return $rootNode;
        }
 }
index 5d1743e..51ae42d 100644 (file)
@@ -117,12 +117,10 @@ class StripState {
                        return $text;
                }
 
-               wfProfileIn( __METHOD__ );
                $oldType = $this->tempType;
                $this->tempType = $type;
                $text = preg_replace_callback( $this->regex, array( $this, 'unstripCallback' ), $text );
                $this->tempType = $oldType;
-               wfProfileOut( __METHOD__ );
                return $text;
        }
 
index 0f025f3..98797a3 100644 (file)
@@ -121,7 +121,6 @@ class PoolCounterRedis extends PoolCounter {
        }
 
        function acquireForMe() {
-               $section = new ProfileSection( __METHOD__ );
 
                $status = $this->precheckAcquire();
                if ( !$status->isGood() ) {
@@ -132,7 +131,6 @@ class PoolCounterRedis extends PoolCounter {
        }
 
        function acquireForAnyone() {
-               $section = new ProfileSection( __METHOD__ );
 
                $status = $this->precheckAcquire();
                if ( !$status->isGood() ) {
@@ -143,7 +141,6 @@ class PoolCounterRedis extends PoolCounter {
        }
 
        function release() {
-               $section = new ProfileSection( __METHOD__ );
 
                if ( $this->slot === null ) {
                        return Status::newGood( PoolCounter::NOT_LOCKED ); // not locked
index 933397c..5ee9fdb 100644 (file)
@@ -165,12 +165,10 @@ class ResourceLoader {
         * @return string Filtered data, or a comment containing an error message
         */
        public function filter( $filter, $data, $cacheReport = true ) {
-               wfProfileIn( __METHOD__ );
 
                // For empty/whitespace-only data or for unknown filters, don't perform
                // any caching or processing
                if ( trim( $data ) === '' || !in_array( $filter, array( 'minify-js', 'minify-css' ) ) ) {
-                       wfProfileOut( __METHOD__ );
                        return $data;
                }
 
@@ -181,7 +179,6 @@ class ResourceLoader {
                $cacheEntry = $cache->get( $key );
                if ( is_string( $cacheEntry ) ) {
                        wfIncrStats( "rl-$filter-cache-hits" );
-                       wfProfileOut( __METHOD__ );
                        return $cacheEntry;
                }
 
@@ -215,7 +212,6 @@ class ResourceLoader {
                        $this->errors[] = self::formatExceptionNoComment( $e );
                }
 
-               wfProfileOut( __METHOD__ );
 
                return $result;
        }
@@ -229,7 +225,6 @@ class ResourceLoader {
        public function __construct( Config $config = null ) {
                global $IP;
 
-               wfProfileIn( __METHOD__ );
 
                if ( $config === null ) {
                        wfDebug( __METHOD__ . ' was called without providing a Config instance' );
@@ -254,7 +249,6 @@ class ResourceLoader {
                        $this->registerTestModules();
                }
 
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -278,14 +272,12 @@ class ResourceLoader {
         *   not registered
         */
        public function register( $name, $info = null ) {
-               wfProfileIn( __METHOD__ );
 
                // Allow multiple modules to be registered in one call
                $registrations = is_array( $name ) ? $name : array( $name => $info );
                foreach ( $registrations as $name => $info ) {
                        // Disallow duplicate registrations
                        if ( isset( $this->moduleInfos[$name] ) ) {
-                               wfProfileOut( __METHOD__ );
                                // A module has already been registered by this name
                                throw new MWException(
                                        'ResourceLoader duplicate registration error. ' .
@@ -295,7 +287,6 @@ class ResourceLoader {
 
                        // Check $name for validity
                        if ( !self::isValidModuleName( $name ) ) {
-                               wfProfileOut( __METHOD__ );
                                throw new MWException( "ResourceLoader module name '$name' is invalid, "
                                        . "see ResourceLoader::isValidModuleName()" );
                        }
@@ -309,7 +300,6 @@ class ResourceLoader {
                                // New calling convention
                                $this->moduleInfos[$name] = $info;
                        } else {
-                               wfProfileOut( __METHOD__ );
                                throw new MWException(
                                        'ResourceLoader module info type error for module \'' . $name .
                                        '\': expected ResourceLoaderModule or array (got: ' . gettype( $info ) . ')'
@@ -357,7 +347,6 @@ class ResourceLoader {
                        }
                }
 
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -371,7 +360,6 @@ class ResourceLoader {
                                . 'Edit your <code>LocalSettings.php</code> to enable it.' );
                }
 
-               wfProfileIn( __METHOD__ );
 
                // Get core test suites
                $testModules = array();
@@ -400,7 +388,6 @@ class ResourceLoader {
                        $this->testModuleNames[$id] = array_keys( $testModules[$id] );
                }
 
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -579,7 +566,6 @@ class ResourceLoader {
                // See http://bugs.php.net/bug.php?id=36514
                ob_start();
 
-               wfProfileIn( __METHOD__ );
 
                // Find out which modules are missing and instantiate the others
                $modules = array();
@@ -632,7 +618,6 @@ class ResourceLoader {
 
                // If there's an If-Modified-Since header, respond with a 304 appropriately
                if ( $this->tryRespondLastModified( $context, $mtime ) ) {
-                       wfProfileOut( __METHOD__ );
                        return; // output handled (buffers cleared)
                }
 
@@ -682,7 +667,6 @@ class ResourceLoader {
                $this->errors = array();
                echo $response;
 
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -880,7 +864,6 @@ class ResourceLoader {
    no modules were requested. Max made me put this here. */";
                }
 
-               wfProfileIn( __METHOD__ );
 
                $image = $context->getImageObj();
                if ( $image ) {
@@ -889,7 +872,6 @@ class ResourceLoader {
                                $data = '';
                                $this->errors[] = 'Image generation failed';
                        }
-                       wfProfileOut( __METHOD__ );
                        return $data;
                }
 
@@ -1066,7 +1048,6 @@ class ResourceLoader {
                        }
                }
 
-               wfProfileOut( __METHOD__ );
                return $out;
        }
 
index 3decabf..c421034 100644 (file)
@@ -527,7 +527,6 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
                if ( isset( $this->modifiedTime[$context->getHash()] ) ) {
                        return $this->modifiedTime[$context->getHash()];
                }
-               wfProfileIn( __METHOD__ );
 
                $files = array();
 
@@ -567,7 +566,6 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
                // giving max() an empty array
                if ( count( $files ) === 0 ) {
                        $this->modifiedTime[$context->getHash()] = 1;
-                       wfProfileOut( __METHOD__ );
                        return $this->modifiedTime[$context->getHash()];
                }
 
@@ -581,7 +579,6 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
                        $this->getDefinitionMtime( $context )
                );
 
-               wfProfileOut( __METHOD__ );
                return $this->modifiedTime[$context->getHash()];
        }
 
index 3f95ce6..4c2c2b2 100644 (file)
@@ -498,10 +498,8 @@ abstract class ResourceLoaderModule {
         * @return int UNIX timestamp
         */
        public function getDefinitionMtime( ResourceLoaderContext $context ) {
-               wfProfileIn( __METHOD__ );
                $summary = $this->getDefinitionSummary( $context );
                if ( $summary === null ) {
-                       wfProfileOut( __METHOD__ );
                        return 1;
                }
 
@@ -523,7 +521,6 @@ abstract class ResourceLoaderModule {
                $data = $cache->get( $key );
                if ( is_int( $data ) && $data > 0 ) {
                        // We've seen this hash before, re-use the timestamp of when we first saw it.
-                       wfProfileOut( __METHOD__ );
                        return $data;
                }
 
@@ -533,7 +530,6 @@ abstract class ResourceLoaderModule {
                $timestamp = time();
                $cache->set( $key, $timestamp );
 
-               wfProfileOut( __METHOD__ );
                return $timestamp;
        }
 
index fb206b9..48b3576 100644 (file)
@@ -187,7 +187,6 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule {
         * @return string JavaScript code for registering all modules with the client loader
         */
        public function getModuleRegistrations( ResourceLoaderContext $context ) {
-               wfProfileIn( __METHOD__ );
 
                $resourceLoader = $context->getResourceLoader();
                $target = $context->getRequest()->getVal( 'target', 'desktop' );
@@ -278,7 +277,6 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule {
                // Register modules
                $out .= ResourceLoader::makeLoaderRegisterScript( $registrations );
 
-               wfProfileOut( __METHOD__ );
                return $out;
        }
 
index 78eba2d..f834085 100644 (file)
@@ -382,7 +382,6 @@ class SearchMySQL extends SearchDatabase {
        function normalizeText( $string ) {
                global $wgContLang;
 
-               wfProfileIn( __METHOD__ );
 
                $out = parent::normalizeText( $string );
 
@@ -416,7 +415,6 @@ class SearchMySQL extends SearchDatabase {
                        "$1u82e$2",
                        $out );
 
-               wfProfileOut( __METHOD__ );
 
                return $out;
        }
index c1a350d..8f25c76 100644 (file)
@@ -104,7 +104,6 @@ class SiteSQLStore implements SiteStore {
         * @return string The cache key.
         */
        protected function getCacheKey() {
-               wfProfileIn( __METHOD__ );
 
                if ( $this->cacheKey === null ) {
                        $type = 'SiteList#' . SiteList::getSerialVersionId();
@@ -117,7 +116,6 @@ class SiteSQLStore implements SiteStore {
                        $this->cacheKey = wfMemcKey( "$source/$type" );
                }
 
-               wfProfileOut( __METHOD__ );
                return $this->cacheKey;
        }
 
@@ -131,7 +129,6 @@ class SiteSQLStore implements SiteStore {
         * @return SiteList
         */
        public function getSites( $source = 'cache' ) {
-               wfProfileIn( __METHOD__ );
 
                if ( $source === 'cache' ) {
                        if ( $this->sites === null ) {
@@ -148,7 +145,6 @@ class SiteSQLStore implements SiteStore {
                        $this->loadSites();
                }
 
-               wfProfileOut( __METHOD__ );
                return $this->sites;
        }
 
@@ -162,7 +158,6 @@ class SiteSQLStore implements SiteStore {
         * @return Site
         */
        protected function siteFromRow( ORMRow $siteRow ) {
-               wfProfileIn( __METHOD__ );
 
                $site = Site::newForType( $siteRow->getField( 'type', Site::TYPE_UNKNOWN ) );
 
@@ -197,7 +192,6 @@ class SiteSQLStore implements SiteStore {
                        $site->setExtraConfig( $siteRow->getField( 'config' ) );
                }
 
-               wfProfileOut( __METHOD__ );
                return $site;
        }
 
@@ -240,7 +234,6 @@ class SiteSQLStore implements SiteStore {
         * @since 1.21
         */
        protected function loadSites() {
-               wfProfileIn( __METHOD__ );
 
                $this->sites = new SiteList();
 
@@ -270,7 +263,6 @@ class SiteSQLStore implements SiteStore {
 
                $this->cache->set( $this->getCacheKey(), $this->sites, $this->cacheTimeout );
 
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -284,11 +276,9 @@ class SiteSQLStore implements SiteStore {
         * @return Site|null
         */
        public function getSite( $globalId, $source = 'cache' ) {
-               wfProfileIn( __METHOD__ );
 
                $sites = $this->getSites( $source );
 
-               wfProfileOut( __METHOD__ );
                return $sites->hasSite( $globalId ) ? $sites->getSite( $globalId ) : null;
        }
 
@@ -315,10 +305,8 @@ class SiteSQLStore implements SiteStore {
         * @return bool Success indicator
         */
        public function saveSites( array $sites ) {
-               wfProfileIn( __METHOD__ );
 
                if ( empty( $sites ) ) {
-                       wfProfileOut( __METHOD__ );
                        return true;
                }
 
@@ -371,7 +359,6 @@ class SiteSQLStore implements SiteStore {
                // purge cache
                $this->reset();
 
-               wfProfileOut( __METHOD__ );
                return $success;
        }
 
@@ -382,12 +369,10 @@ class SiteSQLStore implements SiteStore {
         * @since 1.21
         */
        public function reset() {
-               wfProfileIn( __METHOD__ );
                // purge cache
                $this->cache->delete( $this->getCacheKey() );
                $this->sites = null;
 
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -398,7 +383,6 @@ class SiteSQLStore implements SiteStore {
         * @return bool Success
         */
        public function clear() {
-               wfProfileIn( __METHOD__ );
                $dbw = $this->sitesTable->getWriteDbConnection();
 
                $dbw->startAtomic( __METHOD__ );
@@ -408,7 +392,6 @@ class SiteSQLStore implements SiteStore {
 
                $this->reset();
 
-               wfProfileOut( __METHOD__ );
                return $ok;
        }
 
index 3cdfca0..eedd2a1 100644 (file)
@@ -55,7 +55,6 @@ abstract class BaseTemplate extends QuickTemplate {
         * @return array
         */
        function getToolbox() {
-               wfProfileIn( __METHOD__ );
 
                $toolbox = array();
                if ( isset( $this->data['nav_urls']['whatlinkshere'] )
@@ -113,7 +112,6 @@ abstract class BaseTemplate extends QuickTemplate {
                }
 
                Hooks::run( 'BaseTemplateToolbox', array( &$this, &$toolbox ) );
-               wfProfileOut( __METHOD__ );
                return $toolbox;
        }
 
index 8bd77cc..6e48d04 100644 (file)
@@ -33,7 +33,6 @@ class MediaWikiI18N {
        }
 
        function translate( $value ) {
-               wfProfileIn( __METHOD__ );
 
                // Hack for i18n:attributes in PHPTAL 1.0.0 dev version as of 2004-10-23
                $value = preg_replace( '/^string:/', '', $value );
@@ -48,7 +47,6 @@ class MediaWikiI18N {
                        wfRestoreWarnings();
                        $value = str_replace( $src, $varValue, $value );
                }
-               wfProfileOut( __METHOD__ );
                return $value;
        }
 }
index 3b08e74..9296aa5 100644 (file)
@@ -168,11 +168,9 @@ abstract class Skin extends ContextSource {
         * @param OutputPage $out
         */
        function initPage( OutputPage $out ) {
-               wfProfileIn( __METHOD__ );
 
                $this->preloadExistence();
 
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -942,7 +940,6 @@ abstract class Skin extends ContextSource {
         * @return string HTML anchor
         */
        public function footerLink( $desc, $page ) {
-               $section = new ProfileSection( __METHOD__ );
                // if the link description has been set to "-" in the default language,
                if ( $this->msg( $desc )->inContentLanguage()->isDisabled() ) {
                        // then it is disabled, for all languages.
@@ -1224,7 +1221,6 @@ abstract class Skin extends ContextSource {
         */
        function buildSidebar() {
                global $wgMemc, $wgEnableSidebarCache, $wgSidebarCacheExpiry;
-               wfProfileIn( __METHOD__ );
 
                $key = wfMemcKey( 'sidebar', $this->getLanguage()->getCode() );
 
@@ -1233,7 +1229,6 @@ abstract class Skin extends ContextSource {
                        if ( $cachedsidebar ) {
                                Hooks::run( 'SidebarBeforeOutput', array( $this, &$cachedsidebar ) );
 
-                               wfProfileOut( __METHOD__ );
                                return $cachedsidebar;
                        }
                }
@@ -1248,7 +1243,6 @@ abstract class Skin extends ContextSource {
 
                Hooks::run( 'SidebarBeforeOutput', array( $this, &$bar ) );
 
-               wfProfileOut( __METHOD__ );
                return $bar;
        }
 
@@ -1474,7 +1468,6 @@ abstract class Skin extends ContextSource {
        private function getCachedNotice( $name ) {
                global $wgRenderHashAppend, $parserMemc, $wgContLang;
 
-               wfProfileIn( __METHOD__ );
 
                $needParse = false;
 
@@ -1483,13 +1476,11 @@ abstract class Skin extends ContextSource {
                        global $wgSiteNotice;
                        $notice = $wgSiteNotice;
                        if ( empty( $notice ) ) {
-                               wfProfileOut( __METHOD__ );
                                return false;
                        }
                } else {
                        $msg = $this->msg( $name )->inContentLanguage();
                        if ( $msg->isDisabled() ) {
-                               wfProfileOut( __METHOD__ );
                                return false;
                        }
                        $notice = $msg->plain();
@@ -1516,7 +1507,6 @@ abstract class Skin extends ContextSource {
 
                $notice = Html::rawElement( 'div', array( 'id' => 'localNotice',
                        'lang' => $wgContLang->getHtmlCode(), 'dir' => $wgContLang->getDir() ), $notice );
-               wfProfileOut( __METHOD__ );
                return $notice;
        }
 
@@ -1526,7 +1516,6 @@ abstract class Skin extends ContextSource {
         * @return string HTML fragment
         */
        function getNamespaceNotice() {
-               wfProfileIn( __METHOD__ );
 
                $key = 'namespacenotice-' . $this->getTitle()->getNsText();
                $namespaceNotice = $this->getCachedNotice( $key );
@@ -1536,7 +1525,6 @@ abstract class Skin extends ContextSource {
                        $namespaceNotice = '';
                }
 
-               wfProfileOut( __METHOD__ );
                return $namespaceNotice;
        }
 
@@ -1546,7 +1534,6 @@ abstract class Skin extends ContextSource {
         * @return string HTML fragment
         */
        function getSiteNotice() {
-               wfProfileIn( __METHOD__ );
                $siteNotice = '';
 
                if ( Hooks::run( 'SiteNoticeBefore', array( &$siteNotice, $this ) ) ) {
@@ -1566,7 +1553,6 @@ abstract class Skin extends ContextSource {
                }
 
                Hooks::run( 'SiteNoticeAfter', array( &$siteNotice, $this ) );
-               wfProfileOut( __METHOD__ );
                return $siteNotice;
        }
 
index d393280..960f1c1 100644 (file)
@@ -175,7 +175,6 @@ class SkinTemplate extends Skin {
        }
 
        protected function setupTemplateForOutput() {
-               wfProfileIn( __METHOD__ );
 
                $request = $this->getRequest();
                $user = $this->getUser();
@@ -210,7 +209,6 @@ class SkinTemplate extends Skin {
 
                wfProfileOut( __METHOD__ . '-stuff' );
 
-               wfProfileOut( __METHOD__ );
 
                return $tpl;
        }
@@ -221,7 +219,6 @@ class SkinTemplate extends Skin {
         * @param OutputPage $out
         */
        function outputPage( OutputPage $out = null ) {
-               wfProfileIn( __METHOD__ );
                Profiler::instance()->setTemplated( true );
 
                $oldContext = null;
@@ -250,7 +247,6 @@ class SkinTemplate extends Skin {
                        $this->setContext( $oldContext );
                }
 
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -265,7 +261,6 @@ class SkinTemplate extends Skin {
                        $wgShowCreditsIfMax, $wgArticlePath,
                        $wgScriptPath, $wgServer;
 
-               wfProfileIn( __METHOD__ );
 
                $title = $this->getTitle();
                $request = $this->getRequest();
@@ -507,7 +502,6 @@ class SkinTemplate extends Skin {
                $tpl->set( 'dataAfterContent', $this->afterContentHook() );
                wfProfileOut( __METHOD__ . '-stuff5' );
 
-               wfProfileOut( __METHOD__ );
                return $tpl;
        }
 
@@ -571,7 +565,6 @@ class SkinTemplate extends Skin {
                $title = $this->getTitle();
                $request = $this->getRequest();
                $pageurl = $title->getLocalURL();
-               wfProfileIn( __METHOD__ );
 
                /* set up the default links for the personal toolbar */
                $personal_urls = array();
@@ -704,7 +697,6 @@ class SkinTemplate extends Skin {
                }
 
                Hooks::run( 'PersonalUrls', array( &$personal_urls, &$title, $this ) );
-               wfProfileOut( __METHOD__ );
                return $personal_urls;
        }
 
@@ -822,7 +814,6 @@ class SkinTemplate extends Skin {
        protected function buildContentNavigationUrls() {
                global $wgDisableLangConversion;
 
-               wfProfileIn( __METHOD__ );
 
                // Display tabs for the relevant title rather than always the title itself
                $title = $this->getRelevantTitle();
@@ -1138,7 +1129,6 @@ class SkinTemplate extends Skin {
                        }
                }
 
-               wfProfileOut( __METHOD__ );
 
                return $content_navigation;
        }
@@ -1150,7 +1140,6 @@ class SkinTemplate extends Skin {
         */
        private function buildContentActionUrls( $content_navigation ) {
 
-               wfProfileIn( __METHOD__ );
 
                // content_actions has been replaced with content_navigation for backwards
                // compatibility and also for skins that just want simple tabs content_actions
@@ -1183,7 +1172,6 @@ class SkinTemplate extends Skin {
                        }
                }
 
-               wfProfileOut( __METHOD__ );
 
                return $content_actions;
        }
@@ -1195,7 +1183,6 @@ class SkinTemplate extends Skin {
        protected function buildNavUrls() {
                global $wgUploadNavigationUrl;
 
-               wfProfileIn( __METHOD__ );
 
                $out = $this->getOutput();
                $request = $this->getRequest();
@@ -1301,7 +1288,6 @@ class SkinTemplate extends Skin {
                        }
                }
 
-               wfProfileOut( __METHOD__ );
                return $nav_urls;
        }
 
index e31ebf6..175b0cb 100644 (file)
@@ -220,7 +220,6 @@ class SpecialPageFactory {
                global $wgPageLanguageUseDB;
 
                if ( !is_array( self::$list ) ) {
-                       wfProfileIn( __METHOD__ );
 
                        self::$list = self::$coreList;
 
@@ -254,7 +253,6 @@ class SpecialPageFactory {
                        // This hook can be used to remove undesired built-in special pages
                        Hooks::run( 'SpecialPage_initList', array( &self::$list ) );
 
-                       wfProfileOut( __METHOD__ );
                }
 
                return self::$list;
@@ -527,7 +525,6 @@ class SpecialPageFactory {
         * @return bool
         */
        public static function executePath( Title &$title, IContextSource &$context, $including = false ) {
-               wfProfileIn( __METHOD__ );
 
                // @todo FIXME: Redirects broken due to this call
                $bits = explode( '/', $title->getDBkey(), 2 );
@@ -549,7 +546,6 @@ class SpecialPageFactory {
                        }
 
                        $context->getOutput()->showErrorPage( 'nosuchspecialpage', 'nospecialpagetext' );
-                       wfProfileOut( __METHOD__ );
 
                        return false;
                }
@@ -569,14 +565,12 @@ class SpecialPageFactory {
                                $title = $page->getPageTitle( $par );
                                $url = $title->getFullURL( $query );
                                $context->getOutput()->redirect( $url );
-                               wfProfileOut( __METHOD__ );
 
                                return $title;
                        } else {
                                $context->setTitle( $page->getPageTitle( $par ) );
                        }
                } elseif ( !$page->isIncludable() ) {
-                       wfProfileOut( __METHOD__ );
 
                        return false;
                }
@@ -584,11 +578,7 @@ class SpecialPageFactory {
                $page->including( $including );
 
                // Execute special page
-               $profName = 'Special:' . $page->getName();
-               wfProfileIn( $profName );
                $page->run( $par );
-               wfProfileOut( $profName );
-               wfProfileOut( __METHOD__ );
 
                return true;
        }
index 96be4d0..a6721f0 100644 (file)
@@ -223,7 +223,6 @@ class AllMessagesTablePager extends TablePager {
        }
 
        function getAllMessages( $descending ) {
-               wfProfileIn( __METHOD__ );
                $messageNames = Language::getLocalisationCache()->getSubitemList( 'en', 'messages' );
                if ( $descending ) {
                        rsort( $messageNames );
@@ -234,7 +233,6 @@ class AllMessagesTablePager extends TablePager {
                // Normalise message names so they look like page titles
                $messageNames = array_map( array( $this->lang, 'ucfirst' ), $messageNames );
 
-               wfProfileOut( __METHOD__ );
 
                return $messageNames;
        }
index 23b739a..4583430 100644 (file)
@@ -427,7 +427,6 @@ class BlockListPager extends TablePager {
         * @param ResultWrapper $result
         */
        function preprocessResults( $result ) {
-               wfProfileIn( __METHOD__ );
                # Do a link batch query
                $lb = new LinkBatch;
                $lb->setCaller( __METHOD__ );
@@ -452,6 +451,5 @@ class BlockListPager extends TablePager {
                }
 
                $lb->execute();
-               wfProfileOut( __METHOD__ );
        }
 }
index 5030c1c..da2dc7c 100644 (file)
@@ -954,7 +954,6 @@ class ContribsPager extends ReverseChronologicalPager {
         * @return string
         */
        function formatRow( $row ) {
-               wfProfileIn( __METHOD__ );
 
                $ret = '';
                $classes = array();
@@ -1118,7 +1117,6 @@ class ContribsPager extends ReverseChronologicalPager {
                        $ret = Html::rawElement( 'li', array( 'class' => $classes ), $ret ) . "\n";
                }
 
-               wfProfileOut( __METHOD__ );
 
                return $ret;
        }
index 7e5d13c..659a413 100644 (file)
@@ -151,7 +151,6 @@ class DeletedContribsPager extends IndexPager {
         * @return string
         */
        function formatRow( $row ) {
-               wfProfileIn( __METHOD__ );
 
                $page = Title::makeTitle( $row->ar_namespace, $row->ar_title );
 
@@ -258,7 +257,6 @@ class DeletedContribsPager extends IndexPager {
 
                $ret = Html::rawElement( 'li', array(), $ret ) . "\n";
 
-               wfProfileOut( __METHOD__ );
 
                return $ret;
        }
index 07a18b0..a4e2af9 100644 (file)
@@ -521,7 +521,6 @@ class MergeHistoryPager extends ReverseChronologicalPager {
        }
 
        function getStartBody() {
-               wfProfileIn( __METHOD__ );
                # Do a link batch query
                $this->mResult->seek( 0 );
                $batch = new LinkBatch();
@@ -544,7 +543,6 @@ class MergeHistoryPager extends ReverseChronologicalPager {
                $batch->execute();
                $this->mResult->seek( 0 );
 
-               wfProfileOut( __METHOD__ );
 
                return '';
        }
index a40da87..23c1dd6 100644 (file)
@@ -72,7 +72,6 @@ class SpecialProtectedtitles extends SpecialPage {
         * @return string
         */
        function formatRow( $row ) {
-               wfProfileIn( __METHOD__ );
 
                static $infinity = null;
 
@@ -82,7 +81,6 @@ class SpecialProtectedtitles extends SpecialPage {
 
                $title = Title::makeTitleSafe( $row->pt_namespace, $row->pt_title );
                if ( !$title ) {
-                       wfProfileOut( __METHOD__ );
 
                        return Html::rawElement(
                                'li',
@@ -119,7 +117,6 @@ class SpecialProtectedtitles extends SpecialPage {
                        )->escaped();
                }
 
-               wfProfileOut( __METHOD__ );
 
                // @todo i18n: This should use a comma separator instead of a hard coded comma, right?
                return '<li>' . $lang->specialList( $link, implode( $description_items, ', ' ) ) . "</li>\n";
@@ -227,7 +224,6 @@ class ProtectedTitlesPager extends AlphabeticPager {
        }
 
        function getStartBody() {
-               wfProfileIn( __METHOD__ );
                # Do a link batch query
                $this->mResult->seek( 0 );
                $lb = new LinkBatch;
@@ -237,7 +233,6 @@ class ProtectedTitlesPager extends AlphabeticPager {
                }
 
                $lb->execute();
-               wfProfileOut( __METHOD__ );
 
                return '';
        }
index b3b72ea..55be2c2 100644 (file)
@@ -206,7 +206,6 @@ class SpecialSearch extends SpecialPage {
        public function showResults( $term ) {
                global $wgContLang;
 
-               $profile = new ProfileSection( __METHOD__ );
                $search = $this->getSearchEngine();
                $search->setLimitOffset( $this->limit, $this->offset );
                $search->setNamespaces( $this->namespaces );
@@ -564,7 +563,6 @@ class SpecialSearch extends SpecialPage {
        protected function showMatches( &$matches ) {
                global $wgContLang;
 
-               $profile = new ProfileSection( __METHOD__ );
                $terms = $wgContLang->convertForSearchResult( $matches->termMatches() );
 
                $out = "<ul class='mw-search-results'>\n";
@@ -590,7 +588,6 @@ class SpecialSearch extends SpecialPage {
         * @return string
         */
        protected function showHit( $result, $terms ) {
-               $profile = new ProfileSection( __METHOD__ );
 
                if ( $result->isBrokenTitle() ) {
                        return '';
@@ -749,7 +746,6 @@ class SpecialSearch extends SpecialPage {
         */
        protected function showInterwiki( $matches, $query ) {
                global $wgContLang;
-               $profile = new ProfileSection( __METHOD__ );
 
                $out = "<div id='mw-search-interwiki'><div id='mw-search-interwiki-caption'>" .
                        $this->msg( 'search-interwiki-caption' )->text() . "</div>\n";
@@ -800,7 +796,6 @@ class SpecialSearch extends SpecialPage {
         * @return string
         */
        protected function showInterwikiHit( $result, $lastInterwiki, $query, $customCaptions ) {
-               $profile = new ProfileSection( __METHOD__ );
 
                if ( $result->isBrokenTitle() ) {
                        return '';
index a1556dc..a196e77 100644 (file)
@@ -252,7 +252,6 @@ class SpecialVersion extends SpecialPage {
         */
        public static function getVersion( $flags = '' ) {
                global $wgVersion, $IP;
-               wfProfileIn( __METHOD__ );
 
                $gitInfo = self::getGitHeadSha1( $IP );
                $svnInfo = self::getSvnInfo( $IP );
@@ -276,7 +275,6 @@ class SpecialVersion extends SpecialPage {
                                )->text();
                }
 
-               wfProfileOut( __METHOD__ );
 
                return $version;
        }
@@ -291,7 +289,6 @@ class SpecialVersion extends SpecialPage {
         */
        public static function getVersionLinked() {
                global $wgVersion;
-               wfProfileIn( __METHOD__ );
 
                $gitVersion = self::getVersionLinkedGit();
                if ( $gitVersion ) {
@@ -305,7 +302,6 @@ class SpecialVersion extends SpecialPage {
                        }
                }
 
-               wfProfileOut( __METHOD__ );
 
                return $v;
        }
index 4c96dc8..795afc6 100644 (file)
@@ -261,7 +261,6 @@ abstract class UploadBase {
         * @return string|bool The real path if it was a virtual URL Returns false on failure
         */
        function getRealPath( $srcPath ) {
-               wfProfileIn( __METHOD__ );
                $repo = RepoGroup::singleton()->getLocalRepo();
                if ( $repo->isVirtualUrl( $srcPath ) ) {
                        /** @todo Just make uploads work with storage paths UploadFromStash
@@ -275,7 +274,6 @@ abstract class UploadBase {
                } else {
                        $path = $srcPath;
                }
-               wfProfileOut( __METHOD__ );
 
                return $path;
        }
@@ -285,13 +283,11 @@ abstract class UploadBase {
         * @return mixed Const self::OK or else an array with error information
         */
        public function verifyUpload() {
-               wfProfileIn( __METHOD__ );
 
                /**
                 * If there was no filename or a zero size given, give up quick.
                 */
                if ( $this->isEmptyFile() ) {
-                       wfProfileOut( __METHOD__ );
 
                        return array( 'status' => self::EMPTY_FILE );
                }
@@ -301,7 +297,6 @@ abstract class UploadBase {
                 */
                $maxSize = self::getMaxUploadSize( $this->getSourceType() );
                if ( $this->mFileSize > $maxSize ) {
-                       wfProfileOut( __METHOD__ );
 
                        return array(
                                'status' => self::FILE_TOO_LARGE,
@@ -316,7 +311,6 @@ abstract class UploadBase {
                 */
                $verification = $this->verifyFile();
                if ( $verification !== true ) {
-                       wfProfileOut( __METHOD__ );
 
                        return array(
                                'status' => self::VERIFICATION_ERROR,
@@ -329,7 +323,6 @@ abstract class UploadBase {
                 */
                $result = $this->validateName();
                if ( $result !== true ) {
-                       wfProfileOut( __METHOD__ );
 
                        return $result;
                }
@@ -338,12 +331,10 @@ abstract class UploadBase {
                if ( !Hooks::run( 'UploadVerification',
                        array( $this->mDestName, $this->mTempPath, &$error ) )
                ) {
-                       wfProfileOut( __METHOD__ );
 
                        return array( 'status' => self::HOOK_ABORTED, 'error' => $error );
                }
 
-               wfProfileOut( __METHOD__ );
 
                return array( 'status' => self::OK );
        }
@@ -386,12 +377,10 @@ abstract class UploadBase {
         */
        protected function verifyMimeType( $mime ) {
                global $wgVerifyMimeType;
-               wfProfileIn( __METHOD__ );
                if ( $wgVerifyMimeType ) {
                        wfDebug( "mime: <$mime> extension: <{$this->mFinalExtension}>\n" );
                        global $wgMimeTypeBlacklist;
                        if ( $this->checkFileExtension( $mime, $wgMimeTypeBlacklist ) ) {
-                               wfProfileOut( __METHOD__ );
 
                                return array( 'filetype-badmime', $mime );
                        }
@@ -406,14 +395,12 @@ abstract class UploadBase {
                        $ieTypes = $magic->getIEMimeTypes( $this->mTempPath, $chunk, $extMime );
                        foreach ( $ieTypes as $ieType ) {
                                if ( $this->checkFileExtension( $ieType, $wgMimeTypeBlacklist ) ) {
-                                       wfProfileOut( __METHOD__ );
 
                                        return array( 'filetype-bad-ie-mime', $ieType );
                                }
                        }
                }
 
-               wfProfileOut( __METHOD__ );
 
                return true;
        }
@@ -425,11 +412,9 @@ abstract class UploadBase {
         */
        protected function verifyFile() {
                global $wgVerifyMimeType, $wgDisableUploadScriptChecks;
-               wfProfileIn( __METHOD__ );
 
                $status = $this->verifyPartialFile();
                if ( $status !== true ) {
-                       wfProfileOut( __METHOD__ );
 
                        return $status;
                }
@@ -440,7 +425,6 @@ abstract class UploadBase {
                if ( $wgVerifyMimeType ) {
                        # XXX: Missing extension will be caught by validateName() via getTitle()
                        if ( $this->mFinalExtension != '' && !$this->verifyExtension( $mime, $this->mFinalExtension ) ) {
-                               wfProfileOut( __METHOD__ );
 
                                return array( 'filetype-mime-mismatch', $this->mFinalExtension, $mime );
                        }
@@ -451,7 +435,6 @@ abstract class UploadBase {
                        if ( $this->mFinalExtension == 'svg' || $mime == 'image/svg+xml' ) {
                                $svgStatus = $this->detectScriptInSvg( $this->mTempPath, false );
                                if ( $svgStatus !== false ) {
-                                       wfProfileOut( __METHOD__ );
 
                                        return $svgStatus;
                                }
@@ -463,7 +446,6 @@ abstract class UploadBase {
                        $handlerStatus = $handler->verifyUpload( $this->mTempPath );
                        if ( !$handlerStatus->isOK() ) {
                                $errors = $handlerStatus->getErrorsArray();
-                               wfProfileOut( __METHOD__ );
 
                                return reset( $errors );
                        }
@@ -471,13 +453,11 @@ abstract class UploadBase {
 
                Hooks::run( 'UploadVerifyFile', array( $this, $mime, &$status ) );
                if ( $status !== true ) {
-                       wfProfileOut( __METHOD__ );
 
                        return $status;
                }
 
                wfDebug( __METHOD__ . ": all clear; passing.\n" );
-               wfProfileOut( __METHOD__ );
 
                return true;
        }
@@ -492,7 +472,6 @@ abstract class UploadBase {
         */
        protected function verifyPartialFile() {
                global $wgAllowJavaUploads, $wgDisableUploadScriptChecks;
-               wfProfileIn( __METHOD__ );
 
                # getTitle() sets some internal parameters like $this->mFinalExtension
                $this->getTitle();
@@ -503,7 +482,6 @@ abstract class UploadBase {
                $mime = $this->mFileProps['file-mime'];
                $status = $this->verifyMimeType( $mime );
                if ( $status !== true ) {
-                       wfProfileOut( __METHOD__ );
 
                        return $status;
                }
@@ -511,14 +489,12 @@ abstract class UploadBase {
                # check for htmlish code and javascript
                if ( !$wgDisableUploadScriptChecks ) {
                        if ( self::detectScript( $this->mTempPath, $mime, $this->mFinalExtension ) ) {
-                               wfProfileOut( __METHOD__ );
 
                                return array( 'uploadscripted' );
                        }
                        if ( $this->mFinalExtension == 'svg' || $mime == 'image/svg+xml' ) {
                                $svgStatus = $this->detectScriptInSvg( $this->mTempPath, true );
                                if ( $svgStatus !== false ) {
-                                       wfProfileOut( __METHOD__ );
 
                                        return $svgStatus;
                                }
@@ -535,13 +511,11 @@ abstract class UploadBase {
                                $errors = $zipStatus->getErrorsArray();
                                $error = reset( $errors );
                                if ( $error[0] !== 'zip-wrong-format' ) {
-                                       wfProfileOut( __METHOD__ );
 
                                        return $error;
                                }
                        }
                        if ( $this->mJavaDetected ) {
-                               wfProfileOut( __METHOD__ );
 
                                return array( 'uploadjava' );
                        }
@@ -550,12 +524,10 @@ abstract class UploadBase {
                # Scan the uploaded file for viruses
                $virus = $this->detectVirus( $this->mTempPath );
                if ( $virus ) {
-                       wfProfileOut( __METHOD__ );
 
                        return array( 'uploadvirus', $virus );
                }
 
-               wfProfileOut( __METHOD__ );
 
                return true;
        }
@@ -649,7 +621,6 @@ abstract class UploadBase {
         */
        public function checkWarnings() {
                global $wgLang;
-               wfProfileIn( __METHOD__ );
 
                $warnings = array();
 
@@ -718,7 +689,6 @@ abstract class UploadBase {
                        }
                }
 
-               wfProfileOut( __METHOD__ );
 
                return $warnings;
        }
@@ -735,7 +705,6 @@ abstract class UploadBase {
         * @return Status Indicating the whether the upload succeeded.
         */
        public function performUpload( $comment, $pageText, $watch, $user ) {
-               wfProfileIn( __METHOD__ );
 
                $status = $this->getLocalFile()->upload(
                        $this->mTempPath,
@@ -760,7 +729,6 @@ abstract class UploadBase {
                        $this->postProcessUpload();
                }
 
-               wfProfileOut( __METHOD__ );
 
                return $status;
        }
@@ -952,13 +920,11 @@ abstract class UploadBase {
         */
        public function stashFile( User $user = null ) {
                // was stashSessionFile
-               wfProfileIn( __METHOD__ );
 
                $stash = RepoGroup::singleton()->getLocalRepo()->getUploadStash( $user );
                $file = $stash->stashFile( $this->mTempPath, $this->getSourceType() );
                $this->mLocalFile = $file;
 
-               wfProfileOut( __METHOD__ );
 
                return $file;
        }
@@ -1099,7 +1065,6 @@ abstract class UploadBase {
         */
        public static function detectScript( $file, $mime, $extension ) {
                global $wgAllowTitlesInSVG;
-               wfProfileIn( __METHOD__ );
 
                # ugly hack: for text files, always look at the entire file.
                # For binary field, just check the first K.
@@ -1115,7 +1080,6 @@ abstract class UploadBase {
                $chunk = strtolower( $chunk );
 
                if ( !$chunk ) {
-                       wfProfileOut( __METHOD__ );
 
                        return false;
                }
@@ -1140,7 +1104,6 @@ abstract class UploadBase {
 
                # check for HTML doctype
                if ( preg_match( "/<!DOCTYPE *X?HTML/i", $chunk ) ) {
-                       wfProfileOut( __METHOD__ );
 
                        return true;
                }
@@ -1149,7 +1112,6 @@ abstract class UploadBase {
                // PHP/expat will interpret the given encoding in the xml declaration (bug 47304)
                if ( $extension == 'svg' || strpos( $mime, 'image/svg' ) === 0 ) {
                        if ( self::checkXMLEncodingMissmatch( $file ) ) {
-                               wfProfileOut( __METHOD__ );
 
                                return true;
                        }
@@ -1188,7 +1150,6 @@ abstract class UploadBase {
                foreach ( $tags as $tag ) {
                        if ( false !== strpos( $chunk, $tag ) ) {
                                wfDebug( __METHOD__ . ": found something that may make it be mistaken for html: $tag\n" );
-                               wfProfileOut( __METHOD__ );
 
                                return true;
                        }
@@ -1204,7 +1165,6 @@ abstract class UploadBase {
                # look for script-types
                if ( preg_match( '!type\s*=\s*[\'"]?\s*(?:\w*/)?(?:ecma|java)!sim', $chunk ) ) {
                        wfDebug( __METHOD__ . ": found script types\n" );
-                       wfProfileOut( __METHOD__ );
 
                        return true;
                }
@@ -1212,7 +1172,6 @@ abstract class UploadBase {
                # look for html-style script-urls
                if ( preg_match( '!(?:href|src|data)\s*=\s*[\'"]?\s*(?:ecma|java)script:!sim', $chunk ) ) {
                        wfDebug( __METHOD__ . ": found html-style script urls\n" );
-                       wfProfileOut( __METHOD__ );
 
                        return true;
                }
@@ -1220,13 +1179,11 @@ abstract class UploadBase {
                # look for css-style script-urls
                if ( preg_match( '!url\s*\(\s*[\'"]?\s*(?:ecma|java)script:!sim', $chunk ) ) {
                        wfDebug( __METHOD__ . ": found css-style script urls\n" );
-                       wfProfileOut( __METHOD__ );
 
                        return true;
                }
 
                wfDebug( __METHOD__ . ": no scripts found\n" );
-               wfProfileOut( __METHOD__ );
 
                return false;
        }
@@ -1650,11 +1607,9 @@ abstract class UploadBase {
         */
        public static function detectVirus( $file ) {
                global $wgAntivirus, $wgAntivirusSetup, $wgAntivirusRequired, $wgOut;
-               wfProfileIn( __METHOD__ );
 
                if ( !$wgAntivirus ) {
                        wfDebug( __METHOD__ . ": virus scanner disabled\n" );
-                       wfProfileOut( __METHOD__ );
 
                        return null;
                }
@@ -1663,7 +1618,6 @@ abstract class UploadBase {
                        wfDebug( __METHOD__ . ": unknown virus scanner: $wgAntivirus\n" );
                        $wgOut->wrapWikiMsg( "<div class=\"error\">\n$1\n</div>",
                                array( 'virus-badscanner', $wgAntivirus ) );
-                       wfProfileOut( __METHOD__ );
 
                        return wfMessage( 'virus-unknownscanner' )->text() . " $wgAntivirus";
                }
@@ -1737,7 +1691,6 @@ abstract class UploadBase {
                        wfDebug( __METHOD__ . ": FOUND VIRUS! scanner feedback: $output \n" );
                }
 
-               wfProfileOut( __METHOD__ );
 
                return $output;
        }
index 55a8994..4441236 100644 (file)
@@ -731,7 +731,6 @@ class IP {
        public static function isConfiguredProxy( $ip ) {
                global $wgSquidServers, $wgSquidServersNoPurge;
 
-               wfProfileIn( __METHOD__ );
                // Quick check of known singular proxy servers
                $trusted = in_array( $ip, $wgSquidServers );
 
@@ -742,7 +741,6 @@ class IP {
                        }
                        $trusted = self::$proxyIpSet->match( $ip );
                }
-               wfProfileOut( __METHOD__ );
 
                return $trusted;
        }
index b602f78..5af4545 100644 (file)
@@ -294,7 +294,6 @@ class MWCryptRand {
         * @see self::generate()
         */
        public function realGenerate( $bytes, $forceStrong = false ) {
-               wfProfileIn( __METHOD__ );
 
                wfDebug( __METHOD__ . ": Generating cryptographic random bytes for " .
                        wfGetAllCallers( 5 ) . "\n" );
@@ -431,7 +430,6 @@ class MWCryptRand {
                wfDebug( __METHOD__ . ": " . strlen( $buffer ) .
                        " bytes of randomness leftover in the buffer.\n" );
 
-               wfProfileOut( __METHOD__ );
 
                return $generated;
        }
index d46845f..fbd4f6d 100644 (file)
@@ -854,7 +854,6 @@ class Language {
         * @since 1.20
         */
        public static function fetchLanguageNames( $inLanguage = null, $include = 'mw' ) {
-               wfProfileIn( __METHOD__ );
                $cacheKey = $inLanguage === null ? 'null' : $inLanguage;
                $cacheKey .= ":$include";
                if ( self::$languageNameCache === null ) {
@@ -866,7 +865,6 @@ class Language {
                        $ret = self::fetchLanguageNamesUncached( $inLanguage, $include );
                        self::$languageNameCache->set( $cacheKey, $ret );
                }
-               wfProfileOut( __METHOD__ );
                return $ret;
        }
 
@@ -4445,7 +4443,6 @@ class Language {
                        return array( $wikiUpperChars, $wikiLowerChars );
                }
 
-               wfProfileIn( __METHOD__ );
                $arr = wfGetPrecompiledData( 'Utf8Case.ser' );
                if ( $arr === false ) {
                        throw new MWException(
@@ -4453,7 +4450,6 @@ class Language {
                }
                $wikiUpperChars = $arr['wikiUpperChars'];
                $wikiLowerChars = $arr['wikiLowerChars'];
-               wfProfileOut( __METHOD__ );
                return array( $wikiUpperChars, $wikiLowerChars );
        }
 
index eae77fb..43d6063 100644 (file)
@@ -336,20 +336,17 @@ class LanguageConverter {
         * @return string The converted text
         */
        public function autoConvert( $text, $toVariant = false ) {
-               wfProfileIn( __METHOD__ );
 
                $this->loadTables();
 
                if ( !$toVariant ) {
                        $toVariant = $this->getPreferredVariant();
                        if ( !$toVariant ) {
-                               wfProfileOut( __METHOD__ );
                                return $text;
                        }
                }
 
                if ( $this->guessVariant( $text, $toVariant ) ) {
-                       wfProfileOut( __METHOD__ );
                        return $text;
                }
 
@@ -446,7 +443,6 @@ class LanguageConverter {
                        $literalIter->next();
                }
 
-               wfProfileOut( __METHOD__ );
                return $output;
        }
 
@@ -460,14 +456,12 @@ class LanguageConverter {
         * @return string Translated text
         */
        public function translate( $text, $variant ) {
-               wfProfileIn( __METHOD__ );
                // If $text is empty or only includes spaces, do nothing
                // Otherwise translate it
                if ( trim( $text ) ) {
                        $this->loadTables();
                        $text = $this->mTables[$variant]->replace( $text );
                }
-               wfProfileOut( __METHOD__ );
                return $text;
        }
 
@@ -478,7 +472,6 @@ class LanguageConverter {
         * @return array Variant => converted text
         */
        public function autoConvertToAllVariants( $text ) {
-               wfProfileIn( __METHOD__ );
                $this->loadTables();
 
                $ret = array();
@@ -486,7 +479,6 @@ class LanguageConverter {
                        $ret[$variant] = $this->translate( $text, $variant );
                }
 
-               wfProfileOut( __METHOD__ );
                return $ret;
        }
 
@@ -856,7 +848,6 @@ class LanguageConverter {
                        return;
                }
 
-               wfProfileIn( __METHOD__ );
                $this->mTablesLoaded = true;
                $this->mTables = false;
                if ( $fromCache ) {
@@ -881,7 +872,6 @@ class LanguageConverter {
                        $wgLangConvMemc->set( $this->mCacheKey, $this->mTables, 43200 );
                        wfProfileOut( __METHOD__ . '-recache' );
                }
-               wfProfileOut( __METHOD__ );
        }
 
        /**
index ac59380..56faa4a 100644 (file)
@@ -44,7 +44,6 @@ class LanguageBe_tarask extends Language {
         * @return string
         */
        function normalizeForSearch( $string ) {
-               wfProfileIn( __METHOD__ );
 
                # MySQL fulltext index doesn't grok utf-8, so we
                # need to fold cases and convert to hex
@@ -54,7 +53,6 @@ class LanguageBe_tarask extends Language {
 
                $s = parent::normalizeForSearch( $s );
 
-               wfProfileOut( __METHOD__ );
                return $s;
        }
 
index 39e62f5..b8af885 100644 (file)
@@ -454,7 +454,6 @@ class LanguageKk extends LanguageKk_cyrl {
         * @return string
         */
        function convertGrammar( $word, $case ) {
-               wfProfileIn( __METHOD__ );
 
                $variant = $this->getPreferredVariant();
                switch ( $variant ) {
@@ -473,7 +472,6 @@ class LanguageKk extends LanguageKk_cyrl {
                                $word = parent::convertGrammarKk_cyrl( $word, $case );
                }
 
-               wfProfileOut( __METHOD__ );
                return $word;
        }
 }
index 3293cc6..d5f3e76 100644 (file)
@@ -54,14 +54,12 @@ class LanguageYue extends Language {
         * @return string
         */
        function normalizeForSearch( $string ) {
-               wfProfileIn( __METHOD__ );
 
                // Double-width roman characters
                $s = self::convertDoubleWidth( $string );
                $s = trim( $s );
                $s = parent::normalizeForSearch( $s );
 
-               wfProfileOut( __METHOD__ );
                return $s;
        }
 }
index 67f8769..cb71217 100644 (file)
@@ -170,7 +170,6 @@ class LanguageZh extends LanguageZh_hans {
         * @return string
         */
        function normalizeForSearch( $string, $autoVariant = 'zh-hans' ) {
-               wfProfileIn( __METHOD__ );
 
                // always convert to zh-hans before indexing. it should be
                // better to use zh-hans for search, since conversion from
@@ -179,7 +178,6 @@ class LanguageZh extends LanguageZh_hans {
                $s = $this->mConverter->autoConvert( $string, $autoVariant );
                // LanguageZh_hans::normalizeForSearch
                $s = parent::normalizeForSearch( $s );
-               wfProfileOut( __METHOD__ );
                return $s;
 
        }
index 6483d90..75a05fd 100644 (file)
@@ -56,14 +56,12 @@ class LanguageZh_hans extends Language {
         * @return string
         */
        function normalizeForSearch( $s ) {
-               wfProfileIn( __METHOD__ );
 
                // Double-width roman characters
                $s = parent::normalizeForSearch( $s );
                $s = trim( $s );
                $s = $this->segmentByWord( $s );
 
-               wfProfileOut( __METHOD__ );
                return $s;
        }
 
index 327c1da..7e07823 100644 (file)
@@ -198,7 +198,6 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
        }
 
        protected function setUp() {
-               wfProfileIn( __METHOD__ );
                parent::setUp();
                $this->called['setUp'] = true;
 
@@ -225,11 +224,9 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
 
                DeferredUpdates::clearPendingUpdates();
 
-               wfProfileOut( __METHOD__ );
        }
 
        protected function tearDown() {
-               wfProfileIn( __METHOD__ );
 
                $this->called['tearDown'] = true;
                // Cleaning up temporary files
@@ -273,7 +270,6 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
                }
 
                parent::tearDown();
-               wfProfileOut( __METHOD__ );
        }
 
        /**
index a972b21..7352dc4 100644 (file)
--- a/thumb.php
+++ b/thumb.php
@@ -92,7 +92,6 @@ function wfThumbHandle404() {
 function wfStreamThumb( array $params ) {
        global $wgVaryOnXFP;
 
-       $section = new ProfileSection( __METHOD__ );
 
        $headers = array(); // HTTP headers to send