Page MenuHomePhabricator

Do not load JavaScript modules when they are not needed
Closed, ResolvedPublic

Description

If I enable the beta option and go to
https://pt.wikipedia.org/wiki/Nativo_digital?oldid=35896963&uselang=en
mw.loader.inspect() shows the big "jquery.ui.core" (and its friends) at the top of the table:

0 "jquery.ui.core" "51.8 kB"
1 "ext.multimediaViewer" "47.6 kB"
2 "momentjs" "36.4 kB"
3 "jquery.ui.button" "25.4 kB"
4 "jquery.ui.resizable" "20.5 kB"
5 "jquery.ui.draggable" "20.3 kB"

Most of this code is completely unnecessary unless the user click in the small icon [[File:Socio.svg]] at the bottom of that page.

See the complete diff:
http://www.diffchecker.com/w5xkay9r


Version: master
Severity: normal

Details

Reference
bz58441

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:20 AM
bzimport set Reference to bz58441.
bzimport added a subscriber: Unknown Object (MLST).

This is definitely something we've wanted to do, but it's not the first priority for us right now, especially given it's still in beta.

I expect we'll do this before it comes out of beta, though.

Gilles raised the priority of this task from Medium to Unbreak Now!.Dec 4 2014, 10:24 AM
Gilles moved this task from Untriaged to Done on the Multimedia board.
Gilles lowered the priority of this task from Unbreak Now! to Medium.Dec 4 2014, 11:21 AM