MaxSem has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/81881


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

Profiling

Change-Id: I4988e95e953f55bc96779c4fcc7d94553d5b3b0c
---
M GadgetHooks.php
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gadgets 
refs/changes/81/81881/1

diff --git a/GadgetHooks.php b/GadgetHooks.php
index 5dad337..ee1f408 100644
--- a/GadgetHooks.php
+++ b/GadgetHooks.php
@@ -32,10 +32,12 @@
         */
        public static function articleSaveComplete( $article, $user, $text ) {
                // update cache if MediaWiki:Gadgets-definition was edited
+               wfProfileIn( __METHOD__ );
                $title = $article->getTitle();
                if ( $title->getNamespace() == NS_MEDIAWIKI && 
$title->getText() == 'Gadgets-definition' ) {
                        Gadget::loadStructuredList( $text );
                }
+               wfProfileOut( __METHOD__ );
                return true;
        }
 
@@ -71,8 +73,10 @@
         * @return bool
         */
        public static function getPreferences( $user, &$preferences ) {
+               wfProfileIn( __METHOD__ );
                $gadgets = Gadget::loadStructuredList();
                if ( !$gadgets ) {
+                       wfProfileOut( __METHOD__ );
                        return true;
                }
 
@@ -128,6 +132,7 @@
                                'prefix' => 'gadget-',
                                'default' => $default,
                        );
+               wfProfileOut( __METHOD__ );
 
                return true;
        }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4988e95e953f55bc96779c4fcc7d94553d5b3b0c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gadgets
Gerrit-Branch: master
Gerrit-Owner: MaxSem <maxsem.w...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to