Per T194098, the more RL modules there are, the larger the startup module, the slower performance, so we want to minimise this.
MobileFrontend currently has 58 resource loader modules.
If we ignore style/image-only modules we are left with 32 modules in Mobilefrontend alone.
Many of these relate to client side code which has been working around the lack of a module loading system.
We should aim to reduce the amount of these modules. Note: the goal is not to remove all of them, but reduce the list as much as we possibly can.
Modules that will not be removed from MobileFrontend (and why!)
|mobile.special.userlogin.scripts||This can be removed when mediawiki.special.userlogin.signup.js is enabled on mobile. This is captured in T211439.|
|mediawiki.template.hogan||shared module and imposed on us by mediawiki core|
|mobile.mediaViewer||We currently split code by feature|
|mobile.languages.structured||We currently split code by feature|
|mobile.talk.overlays||We currently split code by feature|
|mobile.editor.overlay||We currently split code by feature|
|mobile.categories.overlays||We currently split code by feature|
|mobile.editor.ve||We currently split code by feature|
|mobile.notifications.overlay||We currently split code by feature|
- All subtasks are resolved (not stalled, not open)
- Code relating to features is clearly identifiable and intuitive
- Special page code e.g. mobile.special.watchlist.scripts is only loaded on the special page that needs it
- Categories, image overlay, language talk and editor code continues to be lazy loaded and is not part of the initial webpack bundle
- At most 16 of the initial 32 modules remain (50%) - (estimate is made by looking at dependency tree and seeing what needs what)
there were 57 ResourceLoader modules residing MobileFrontend. 24 ResourceLoader modules were removed in the project leaving 34. This estimate was a rough estimate and based on a number (32) which seems incorrect.
The following RL modules are now managed by webpack:
- mediawiki.template.hogan *
- mobile.categories.overlays (T213472) *
- mobile.editor.api (T213340)
- mobile.editor.common (T213340)
- mobile.editor.overlay (T213340) *
- mobile.editor.ve (T213340)
- mobile.editor (T213340)
- mobile.foreignApi (T212518)
- mobile.gallery (T213298)
- mobile.init (T213112) *
- mobile.languages.structured (T210210) *
- mobile.mediaViewer (T210209) *
- mobile.messageBox (TBC_FEATURE_MEDIUM_1)
- mobile.nearby (T213299)
- mobile.notifications.overlay (T213111) *
- mobile.scrollEndEventEmitter +
- mobile.special.userlogin.scripts (T213112)
- mobile.special.mobilediff.scripts (T213112) *
- mobile.special.mobileoptions.scripts (T213112) *
- mobile.special.nearby.scripts (T213299) *
- mobile.special.uploads.scripts (T213298) *
- mobile.special.watchlist.scripts (T212823) *
- mobile.startup *
- mobile.talk.overlays (T213474) *
- mobile.watchlist (T212823)
( RL modules marked with * are unlikely to be removed as part of this epic given their role as an entry point for code splitting purposes - see table above)
( + The mobile.scrollEndEventEmitter module is interesting - it is shared by a special page and a feature. We may want to consider moving this into mobile.startup or splitting code in a different way.)
sign off steps
- Document how many RL modules have disappeared.
- document number of bytes changed