jenkins-bot has submitted this change and it was merged.

Change subject: Profiling
......................................................................


Profiling

Change-Id: I6a5766fd181a31e41ff49d0c9da0933445366486
---
M includes/specials/SpecialMobileWatchlist.php
1 file changed, 31 insertions(+), 1 deletion(-)

Approvals:
  Reedy: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/specials/SpecialMobileWatchlist.php 
b/includes/specials/SpecialMobileWatchlist.php
index 1b2af0b..536ce04 100644
--- a/includes/specials/SpecialMobileWatchlist.php
+++ b/includes/specials/SpecialMobileWatchlist.php
@@ -14,6 +14,8 @@
        private $fromPageTitle;
 
        function execute( $par ) {
+               wfProfileIn( __METHOD__ );
+
                $ctx = MobileContext::singleton();
                $ctx->setOverlay( false );
                $this->usePageImages = $ctx->isBetaGroupMember() && defined( 
'PAGE_IMAGES_INSTALLED' );
@@ -33,6 +35,7 @@
                if( $user->isAnon() ) {
                        // No watchlist for you.
                        parent::execute( $par );
+                       wfProfileOut( __METHOD__ );
                        return;
                } else {
                        $mobileSkin->addArticleClass( 'noMargins watchlist' );
@@ -48,6 +51,8 @@
                        $res = $this->doListQuery();
                        $this->showListResults( $res );
                }
+
+               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -167,6 +172,8 @@
        }
 
        function doFeedQuery() {
+               wfProfileIn( __METHOD__ );
+
                $user = $this->getUser();
                $dbr = wfGetDB( DB_SLAVE, 'watchlist' );
 
@@ -222,12 +229,17 @@
                ChangeTags::modifyDisplayQuery( $tables, $fields, $conds, 
$join_conds, $options, '' );
                wfRunHooks('SpecialWatchlistQuery', 
array(&$conds,&$tables,&$join_conds,&$fields) );
 
+               wfProfileIn( __METHOD__ . '-query' );
                $res = $dbr->select( $tables, $fields, $conds, __METHOD__, 
$options, $join_conds );
+               wfProfileOut( __METHOD__ . '-query' );
 
+               wfProfileOut( __METHOD__ );
                return $res;
        }
 
        function doListQuery() {
+               wfProfileIn( __METHOD__ );
+
                $user = $this->getUser();
                $dbr = wfGetDB( DB_SLAVE, 'watchlist' );
 
@@ -279,8 +291,11 @@
                        $conds[] = "wl_namespace > $ns OR (wl_namespace = $ns 
AND wl_title >= $titleQuoted)";
                }
 
+               wfProfileIn( __METHOD__ . '-query' );
                $res = $dbr->select( $tables, $fields, $conds, __METHOD__, 
$options, $joinConds );
+               wfProfileOut( __METHOD__ . '-query' );
 
+               wfProfileOut( __METHOD__ );
                return $res;
        }
 
@@ -293,6 +308,8 @@
        }
 
        function showResults( ResultWrapper $res, $feed ) {
+               wfProfileIn( __METHOD__ );
+
                $empty = $res->numRows() === 0;
                $this->seenTitles = array();
 
@@ -347,6 +364,8 @@
                                );
                        }
                }
+
+               wfProfileOut( __METHOD__ );
        }
 
        function showEmptyList( $feed ) {
@@ -376,6 +395,8 @@
        }
 
        private function renderThumb( $row ) {
+               wfProfileIn( __METHOD__ );
+
                if ( $this->usePageImages && !is_null( $row->pp_value ) ) {
                        $file = wfFindFile( $row->pp_value );
                        if ( $file ) {
@@ -390,10 +411,14 @@
                                }
                        }
                }
+
+               wfProfileOut( __METHOD__ );
                return '';
        }
 
        private function showFeedResultRow( $row ) {
+               wfProfileIn( __METHOD__ );
+
                $output = $this->getOutput();
 
                $title = Title::makeTitle( $row->rc_namespace, $row->rc_title );
@@ -443,11 +468,14 @@
                        Html::closeElement( 'a' ) .
                        '</li>'
                );
+
+               wfProfileOut( __METHOD__ );
        }
 
        private function showListResultRow( $row ) {
-               $output = $this->getOutput();
+               wfProfileIn( __METHOD__ );
 
+               $output = $this->getOutput();
                $title = Title::makeTitle( $row->wl_namespace, $row->wl_title );
                $titleText = $title->getPrefixedText();
                $ts = new MWTimestamp( $row->rev_timestamp );
@@ -462,6 +490,8 @@
                        Html::closeElement( 'a' ) .
                        Html::closeElement( 'li' )
                );
+
+               wfProfileOut( __METHOD__ );
        }
 
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/51167
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I6a5766fd181a31e41ff49d0c9da0933445366486
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: MaxSem <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to