From 571a707b3b99c60fa7945e8c645532cda1398f3e Mon Sep 17 00:00:00 2001 From: Func Date: Tue, 23 Mar 2021 15:15:29 +0000 Subject: [PATCH] Query for array of join with ActorMigration::getJoin() to improve performance There is no need for comment text, RevisionStore::getQueryInfo() is overkill, and will cause more time in database query. Bug: T278030 Change-Id: I9c062cd66677aa7d473a3283f29b0e39c5b4ea02 --- src/ContributionScores.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/ContributionScores.php b/src/ContributionScores.php index 46e7170..de8a6af 100644 --- a/src/ContributionScores.php +++ b/src/ContributionScores.php @@ -3,8 +3,6 @@ * \brief Contains code for the ContributionScores Class (extends SpecialPage). */ -use MediaWiki\MediaWikiServices; - /// Special page class for the Contribution Scores extension /** * Special page that generates a list of wiki contributors based @@ -99,10 +97,8 @@ class ContributionScores extends IncludableSpecialPage { $dbr = wfGetDB( DB_REPLICA ); - $store = MediaWikiServices::getInstance() - ->getRevisionStoreFactory() - ->getRevisionStore(); - $revQuery = $store->getQueryInfo(); + $revQuery = ActorMigration::newMigration()->getJoin( 'rev_user' ); + $revQuery['tables'] = array_merge( [ 'revision' ], $revQuery['tables'] ); $revUser = $revQuery['fields']['rev_user'];