From: Aaron Schulz Date: Mon, 16 Dec 2013 01:57:51 +0000 (-0800) Subject: Added more Setup.php profiling X-Git-Tag: 1.31.0-rc.0~17612 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22articles_versions%22%2C%22id_article=%24id_article%22%29%20.%20%22?a=commitdiff_plain;h=87ae5b2402e642e074976d9639cb9e4293169781;p=lhc%2Fweb%2Fwiklou.git Added more Setup.php profiling Change-Id: Ie76c1ae54ccf825f387b57a8e9096f608eb3d120 --- diff --git a/includes/Setup.php b/includes/Setup.php index f75ee2983f..eef5ccb64b 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -36,6 +36,7 @@ if ( !defined( 'MEDIAWIKI' ) ) { $fname = 'Setup.php'; wfProfileIn( $fname ); +wfProfileIn( $fname . '-defaults' ); // Check to see if we are at the file scope if ( !isset( $wgVersion ) ) { @@ -248,8 +249,10 @@ foreach ( $wgForeignFileRepos as &$repo ) { unset( $repo ); // no global pollution; destroy reference if ( is_null( $wgEnableAutoRotation ) ) { + wfProfileIn( $fname . '-defaults-rotation' ); // Only enable auto-rotation when the bitmap handler can rotate $wgEnableAutoRotation = BitmapHandler::canRotate(); + wfProfileOut( $fname . '-defaults-rotation' ); } if ( $wgRCFilterByAge ) { @@ -401,11 +404,15 @@ if ( $wgRC2UDPAddress ) { ); } +wfProfileOut( $fname . '-defaults' ); + // Disable MWDebug for command line mode, this prevents MWDebug from eating up // all the memory from logging SQL queries on maintenance scripts global $wgCommandLineMode; if ( $wgDebugToolbar && !$wgCommandLineMode ) { + wfProfileIn( $fname . '-debugtoolbar' ); MWDebug::init(); + wfProfileOut( $fname . '-debugtoolbar' ); } if ( !class_exists( 'AutoLoader' ) ) { @@ -423,6 +430,7 @@ require_once "$IP/includes/ProxyTools.php"; require_once "$IP/includes/normal/UtfNormalDefines.php"; wfProfileOut( $fname . '-includes' ); +wfProfileIn( $fname . '-defaults2' ); if ( $wgSecureLogin && substr( $wgServer, 0, 2 ) !== '//' ) { $wgSecureLogin = false; wfWarn( 'Secure login was enabled on a server that only supports HTTP or HTTPS. Disabling secure login.' ); @@ -431,7 +439,9 @@ if ( $wgSecureLogin && substr( $wgServer, 0, 2 ) !== '//' ) { # Now that GlobalFunctions is loaded, set defaults that depend # on it. if ( $wgTmpDirectory === false ) { + wfProfileIn( $fname . '-tempDir' ); $wgTmpDirectory = wfTempDir(); + wfProfileOut( $fname . '-tempDir' ); } if ( $wgCanonicalServer === false ) { @@ -455,6 +465,7 @@ if ( !$wgHTCPRouting && $wgHTCPMulticastAddress ) { ); } +wfProfileOut( $fname . '-defaults2' ); wfProfileIn( $fname . '-misc1' ); # Raise the memory limit if it's too low