Revert r44335 "Tweak profile calls"
authorBrion Vibber <brion@users.mediawiki.org>
Thu, 11 Dec 2008 00:29:37 +0000 (00:29 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Thu, 11 Dec 2008 00:29:37 +0000 (00:29 +0000)
Let the doUpdates() func get counted even when it has nothing to do; otherwise stats will be skewed to only times when there are multiple updates. Or.... hmmm. bleah.

includes/Wiki.php

index e8fd40d..f7c2723 100644 (file)
@@ -343,11 +343,13 @@ class MediaWiki {
         * @param $updates array of objects that hold an update to do
         */
        function doUpdates( &$updates ) {
+               wfProfileIn( __METHOD__ );
                /* No need to get master connections in case of empty updates array */
-               if( !$updates ) {
+               if (!$updates) {
+                       wfProfileOut( __METHOD__ );
                        return;
                }
-               wfProfileIn( __METHOD__ );
+
                $dbw = wfGetDB( DB_MASTER );
                foreach( $updates as $up ) {
                        $up->doUpdate();