Page MenuHomePhabricator

Graph analysis of ResourceLoader modules that can be merged to each other
Closed, ResolvedPublic

Assigned To
Authored By
Ladsgroup
Sep 16 2019, 8:07 PM
Referenced Files
F30374010: mediawiki.special.search.png
Sep 16 2019, 8:07 PM
F30374027: ext.3d.special.upload.png
Sep 16 2019, 8:07 PM
F30374044: mobile.special.nearby.scripts.png
Sep 16 2019, 8:07 PM
F30374022: ext.advancedSearch.init.png
Sep 16 2019, 8:07 PM
F30373975: ext.RevisionSlider.init.png
Sep 16 2019, 8:07 PM
F30373982: ext.CodeMirror.lib.mode.php.png
Sep 16 2019, 8:07 PM
F30374031: ext.tmh.player.png
Sep 16 2019, 8:07 PM
F30373968: ext.graph.sandbox.png
Sep 16 2019, 8:07 PM

Description

Running T232728#5495112 on enwiki startup modules yields these RL modules that can be merged (note it doesn't consider lazy loading, soft dependencies, and lots of other factors, keep it in mind the results are not 100% should result to merging these modules).

(CX is in T231326#5488932)

TimedMediaHandler

mw.TimedText.png (443×3 px, 111 KB)

ext.tmh.player.png (155×970 px, 24 KB)

PageTriage

ext.pageTriage.views.toolbar.png (251×1 px, 50 KB)

Graph

ext.graph.sandbox.png (443×701 px, 44 KB)

RevisionSlider

ext.RevisionSlider.init.png (347×797 px, 40 KB)

CodeMirror

ext.CodeMirror.lib.mode.php.png (251×1 px, 40 KB)

Citoid

ext.citoid.visualEditor.png (251×917 px, 39 KB)

TemplateData

ext.templateDataGenerator.editTemplatePage.png (251×1 px, 38 KB)

TwoColConflict

ext.TwoColConflict.SplitJs.png (251×735 px, 30 KB)

Core: Special:Block

mediawiki.special.block.png (155×1 px, 28 KB)

Core: Special:Search

mediawiki.special.search.png (347×409 px, 27 KB)

Collection

ext.collection.bookcreator.messageBox.png (155×1 px, 27 KB)

CentralNotice

ext.centralNotice.bannerController.png (347×368 px, 27 KB)

AdvancedSearch

ext.advancedSearch.init.png (251×675 px, 27 KB)

3D

ext.3d.special.upload.png (251×595 px, 24 KB)

MobileFrontend

mobile.special.nearby.scripts.png (155×570 px, 19 KB)

There are way more but I stop at here

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

@Ladsgroup note there may be a few problems in your script - in the MobileFrontend Nearby case, mobile.nearby.images cannot be merged with the parent module as it's a ResourceLoaderImageModule not a ResourceLoaderFileModule. Side note: I think if those two classes could be merged though, this and many other modules could be collapsed.

The nearby.styles module is added via addModuleStyles to avoid flashes of unstyled content. It's also specified as a dependency (possibly redundantly) but that's why it's separate.

@Ladsgroup note there may be a few problems in your script - in the MobileFrontend Nearby case, mobile.nearby.images cannot be merged with the parent module as it's a ResourceLoaderImageModule not a ResourceLoaderFileModule. Side note: I think if those two classes could be merged though, this and many other modules could be collapsed.

The nearby.styles module is added via addModuleStyles to avoid flashes of unstyled content. It's also specified as a dependency (possibly redundantly) but that's why it's separate.

Yeah, it can not distinguish these edge cases. but if I think 'mobile.nearby.images' and its parent can be merged though. Here's an example: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/TemplateData/+/536391/2/extension.json I don't know exactly how though.

That example merges ext.templateDataGenerator.ui.images and ext.templateData.images. It doesn't use packageFiles.

Krinkle triaged this task as Medium priority.Sep 16 2019, 9:52 PM
Krinkle moved this task from Inbox to External on the MediaWiki-ResourceLoader board.
Krinkle removed a project: MediaWiki-ResourceLoader.

Change 537773 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/skins/MinervaNeue@master] Merge skins.minerva.talk and skins.minerva.watchstar into skins.minerva.script

https://gerrit.wikimedia.org/r/537773

Change 537774 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/skins/MinervaNeue@master] Remove 3 modules from Minerva

https://gerrit.wikimedia.org/r/537774

Change 537774 abandoned by Jdlrobson:
Remove 3 modules from Minerva

https://gerrit.wikimedia.org/r/537774

Change 537773 merged by jenkins-bot:
[mediawiki/skins/MinervaNeue@master] Merge skins.minerva.talk and skins.minerva.watchstar into skins.minerva.script

https://gerrit.wikimedia.org/r/537773

Krinkle claimed this task.