Page MenuHomePhabricator

Load edit modules only when clicked on edit
Open, MediumPublic

Description

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 raised the priority of this task from to Needs Triage.
Bene updated the task description. (Show Details)
Bene subscribed.
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?

Addshore subscribed.

Maybe this can be a trailblaze or camp?

Do you think it would be that big?

I suggest doing a POC to get a feeling how much work this can be.