Page MenuHomePhabricator

ResourceLoader checks touched date twice for some pages
Closed, ResolvedPublic

Description

For modules with js and css pages, the ResourceLoader is checking the touched date twice for all pages of that module. The first time, when building the CSS and the second time, when building the scripts.

For example:
SELECT page_namespace,page_title,page_touched FROM page WHERE (page_namespace = '8' AND page_title IN ('Common.js','Common.css','Vector.js','Vector.css','Print.css') )
Callers:
MediaWiki::run/MediaWiki::main/MediaWiki::finalCleanup/OutputPage::output/SkinTemplate::outputPage/Skin::bottomScripts/OutputPage::getBottomScripts/OutputPage::getScriptsForBottomQueue/OutputPage::makeResourceLoaderLink/ResourceLoaderWikiModule::isKnownEmpty/ResourceLoaderWikiModule::getTitleMtimes/DatabaseBase::select

SELECT page_namespace,page_title,page_touched FROM page WHERE (page_namespace = '8' AND page_title IN ('Common.js','Common.css','Vector.js','Vector.css','Print.css') )
Callers:
MediaWiki::run/MediaWiki::main/MediaWiki::finalCleanup/OutputPage::output/SkinTemplate::outputPage/OutputPage::headElement/OutputPage::buildCssLinks/OutputPage::makeResourceLoaderLink/ResourceLoaderWikiModule::isKnownEmpty/ResourceLoaderWikiModule::getTitleMtimes/DatabaseBase::select

This is the same for the group-*.js/.css pages (ResourceLoaderUserGroupsModule).

When the module only contains css pages, there is only one select (ResourceLoaderNoscriptModule)

So you have 5 queries for loggedin users. You can reduce this to 3, maybe combine all to one query? When this is already done in the ResourceLoader2, than mark this as FIXED.

Thanks.


Version: 1.20.x
Severity: enhancement

Details

Reference
bz34339

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 12:10 AM
bzimport set Reference to bz34339.
bzimport added a subscriber: Unknown Object (MLST).
duplicatebug claimed this task.
duplicatebug added a subscriber: duplicatebug.

No longer see the duplicate queries, so this is fixed now. But I have no idea which change it fixed.

duplicatebug set Security to None.