r96835 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96834‎ | r96835 | r96836 >
Date:12:25, 12 September 2011
Author:tstarling
Status:ok
Tags:
Comment:
Live hacks:
* Reduce the load on the statistics server by removing the per-request counters
* Fix Parser call stack profiling, which was corrupted due to Parser unstubbing
Modified paths:
  • /branches/wmf/1.17wmf1/includes/Setup.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/includes/Setup.php
@@ -342,11 +342,11 @@
343343
344344 if( !defined( 'MW_NO_SESSION' ) && !$wgCommandLineMode ) {
345345 if( $wgRequest->checkSessionCookie() || isset( $_COOKIE[$wgCookiePrefix.'Token'] ) ) {
346 - wfIncrStats( 'request_with_session' );
 346+ #wfIncrStats( 'request_with_session' );
347347 wfSetupSession();
348348 $wgSessionStarted = true;
349349 } else {
350 - wfIncrStats( 'request_without_session' );
 350+ #wfIncrStats( 'request_without_session' );
351351 $wgSessionStarted = false;
352352 }
353353 }
@@ -361,8 +361,12 @@
362362 $wgUser = $wgCommandLineMode ? new User : User::newFromSession();
363363 $wgLang = new StubUserLang;
364364 $wgOut = new StubObject( 'wgOut', 'OutputPage' );
365 -$wgParser = new StubObject( 'wgParser', $wgParserConf['class'], array( $wgParserConf ) );
366365
 366+#$wgParser = new StubObject( 'wgParser', $wgParserConf['class'], array( $wgParserConf ) );
 367+# Live hack to clear up profiling -- TS
 368+$class = $wgParserConf['class'];
 369+$wgParser = new $class( $wgParserConf );
 370+
367371 $wgMessageCache = new StubObject( 'wgMessageCache', 'MessageCache',
368372 array( $messageMemc, $wgUseDatabaseMessages, $wgMsgCacheExpiry ) );
369373

Follow-up revisions

RevisionCommit summaryAuthorDate
r975081.18wmf1, Merge r96552, r96835reedy15:35, 19 September 2011

Status & tagging log