r23768 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r23767‎ | r23768 | r23769 >
Date:04:23, 6 July 2007
Author:robchurch
Status:old
Tags:
Comment:
Use SiteStats accessors so we benefit from caching, etc. in wfQueriesMustScale() - per Simetrical
Modified paths:
  • /trunk/phase3/includes/GlobalFunctions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/GlobalFunctions.php
@@ -2268,15 +2268,10 @@
22692269 // Unconditional performance requirement
22702270 if( $wgMiserMode )
22712271 return true;
2272 - // Make a rough estimate
2273 - $dbr = wfGetDB( DB_SLAVE );
2274 - $stats = $dbr->selectRow(
2275 - 'site_stats',
2276 - array( 'ss_total_pages AS pages', 'ss_total_edits AS edits', 'ss_users AS users' ),
2277 - array(),
2278 - __METHOD__
2279 - );
2280 - return $stats->pages > 100000 && $stats->edits > 1000000 && $stats->users > 10000;
 2272+ // Rough estimate based on statistics
 2273+ return SiteStats::pages() > 100000
 2274+ && SiteStats::edits() > 1000000
 2275+ && SiteStats::users() > 10000;
22812276 }
22822277
22832278 /**

Follow-up revisions

RevisionCommit summaryAuthorDate
r23912Merged revisions 23662-23909 via svnmerge from...david18:11, 9 July 2007

Status & tagging log