Page MenuHomePhabricator

Load edit modules only when clicked on edit
Open, MediumPublic


Currently all javascript modules are loaded when a user enters an item's page. However, most of the javascript modules are only used for editing, so they should be loaded when actually clicking on edit and not from the beginning.

For example, when clicking on [edit] in the sitelinks section, then and only then the modules for editing sitelinks should be loaded. Same for all other modules like entitytermsview and statementsview. This will improve performance a lot and decrease the time it takes for users to load a Wikidata page.

Event Timeline

Bene created this task.May 24 2015, 8:20 AM
Bene raised the priority of this task from to Needs Triage.
Bene updated the task description. (Show Details)
Bene added a subscriber: Bene.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 24 2015, 8:20 AM
Lydia_Pintscher triaged this task as High priority.Jun 26 2015, 11:35 AM
Lydia_Pintscher set Security to None.
Addshore lowered the priority of this task from High to Medium.Oct 31 2018, 5:35 PM

While doing some frontend clean up, I found this to be rather important (so I don't think it should normal priority). We ship 1.7MB (minified and bundled) of javascript to our users on every request. Not just the network usage is crazy, it's also makes reading items really hard. It 300KB after compression and we get 5M requests to Wikibase modules (also because we ship that to every page of files on commons as well now) per week. roughly it's 250 GB per day which is not super super big but given it's a big package to the users, the UX is not great.

Maybe this can be a trailblaze or camp?