r97508 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r97507‎ | r97508 | r97509 >
Date:15:35, 19 September 2011
Author:reedy
Status:ok
Tags:
Comment:
1.18wmf1, Merge r96552, r96835
Modified paths:
  • /branches/wmf/1.18wmf1/includes/Setup.php (modified) (history)
  • /branches/wmf/1.18wmf1/includes/Skin.php (modified) (history)
  • /branches/wmf/1.18wmf1/includes/cache/MessageCache.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.18wmf1/includes/Setup.php
@@ -416,11 +416,11 @@
417417
418418 if ( !defined( 'MW_NO_SESSION' ) && !$wgCommandLineMode ) {
419419 if ( $wgRequest->checkSessionCookie() || isset( $_COOKIE[$wgCookiePrefix . 'Token'] ) ) {
420 - wfIncrStats( 'request_with_session' );
 420+ # wfIncrStats( 'request_with_session' );
421421 wfSetupSession();
422422 $wgSessionStarted = true;
423423 } else {
424 - wfIncrStats( 'request_without_session' );
 424+ # wfIncrStats( 'request_without_session' );
425425 $wgSessionStarted = false;
426426 }
427427 }
@@ -449,7 +449,10 @@
450450 /**
451451 * @var Parser
452452 */
453 -$wgParser = new StubObject( 'wgParser', $wgParserConf['class'], array( $wgParserConf ) );
 453+#$wgParser = new StubObject( 'wgParser', $wgParserConf['class'], array( $wgParserConf ) );
 454+# Live hack to clear up profiling -- TS
 455+$class = $wgParserConf['class'];
 456+$wgParser = new $class( $wgParserConf );
454457
455458 if ( !is_object( $wgAuth ) ) {
456459 $wgAuth = new StubObject( 'wgAuth', 'AuthPlugin' );
Index: branches/wmf/1.18wmf1/includes/cache/MessageCache.php
@@ -457,10 +457,10 @@
458458 $codes = array_keys( Language::getLanguageNames() );
459459 }
460460
461 - global $parserMemc;
 461+ global $wgMemc;
462462 foreach ( $codes as $code ) {
463463 $sidebarKey = wfMemcKey( 'sidebar', $code );
464 - $parserMemc->delete( $sidebarKey );
 464+ $wgMemc->delete( $sidebarKey );
465465 }
466466
467467 // Update the message in the message blob store
Index: branches/wmf/1.18wmf1/includes/Skin.php
@@ -1179,13 +1179,13 @@
11801180 * @return array
11811181 */
11821182 function buildSidebar() {
1183 - global $parserMemc, $wgEnableSidebarCache, $wgSidebarCacheExpiry;
 1183+ global $wgMemc, $wgEnableSidebarCache, $wgSidebarCacheExpiry;
11841184 wfProfileIn( __METHOD__ );
11851185
11861186 $key = wfMemcKey( 'sidebar', $this->getLang()->getCode() );
11871187
11881188 if ( $wgEnableSidebarCache ) {
1189 - $cachedsidebar = $parserMemc->get( $key );
 1189+ $cachedsidebar = $wgMemc->get( $key );
11901190 if ( $cachedsidebar ) {
11911191 wfProfileOut( __METHOD__ );
11921192 return $cachedsidebar;
@@ -1197,7 +1197,7 @@
11981198
11991199 wfRunHooks( 'SkinBuildSidebar', array( $this, &$bar ) );
12001200 if ( $wgEnableSidebarCache ) {
1201 - $parserMemc->set( $key, $bar, $wgSidebarCacheExpiry );
 1201+ $wgMemc->set( $key, $bar, $wgSidebarCacheExpiry );
12021202 }
12031203
12041204 wfProfileOut( __METHOD__ );

Follow-up revisions

RevisionCommit summaryAuthorDate
r110856Merge r97508 changes to MessageCache.php and Skin.php into trunkreedy16:49, 7 February 2012
r111194MFT r97505, r97508, r97509, r97512, r99928reedy19:53, 10 February 2012
r114622Remove PrefSwitch/PrefStats...reedy01:16, 30 March 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r96552Committing 2 live hacks swapping cache type (needs reapplying to 1.18wmf1)reedy10:53, 8 September 2011
r96835Live hacks:...tstarling12:25, 12 September 2011

Status & tagging log