We spend about 4-500ms infusing widgets that aren't even visible in the first tab.
Description
Details
| Subject | Repo | Branch | Lines +/- | |
|---|---|---|---|---|
| Lazy-infuse OOUI widgets by tab | mediawiki/core | master | +56 -22 |
| Status | Subtype | Assigned | Task | ||
|---|---|---|---|---|---|
| Open | None | T49145 Formally deprecate jQuery UI after we've stopped using jQuery UI in extensions and core | |||
| Open | None | T100270 Replace use of jQuery UI and MW UI with OOUI across all Wikimedia-deployed extensions and core | |||
| Open | None | T100161 Convert all of MediaWiki core to OOUI PHP (tracking) | |||
| Resolved | matmarex | T101480 Remove 'wgUseMediaWikiUIEverywhere' and code forks, always using the off/false path | |||
| Invalid | None | T101471 Convert core forms that use MW UI with wgUseMediaWikiUIEverywhere false to OOUI FormSpecialPage or explicit OOUI PHP | |||
| Open | None | T107037 Convert all MW core special pages to OOUI | |||
| Open | None | T64559 Redesign Special:Preferences (tracking) | |||
| Resolved | Volker_E | T180538 Improve Special:Preferences UI/UX | |||
| Resolved | Volker_E | T117781 Convert Special:Preferences to OOUI | |||
| Open | None | T203984 Upon reloading Special:Preferences page loads the first tab and then switches to previously opened tab | |||
| Resolved | Esanders | T203838 Lazy infuse OOUI widgets on Special:Preferences |
Event Timeline
Change 458866 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/core@master] Lazy-infuse OOUI widgets by tab
This drops to 200ms after the patch above, most of which is the massive language dropdown.
Probably, although that might make for strange interactions. Might be better than the performance hit, given how slow it is.
We could also change it in a dialog picker, like the VE language widget.
Lazy-init post-domready?
We could also change it in a dialog picker, like the VE language widget.
Yeah, but that'd be a rendering that non-JS users couldn't edit, right?
Lazy-infusing a widget on click might indeed lead to weird interactions, but it should be perfectly possible to infuse it as normal, but not generate all the MenuOptionWidgets until the dropdown handle is clicked. You could do that in a subclass of DropdownInputWidget, but really vanilla DropdownInputWidget could work that way too…
Something very similar is already implemented in mw.rcfilters.ui.MenuSelectWidget (which fills itself from the toggle() method), surely it will also work for DropdownInputWidget, which is much simpler.
Lazy-init post-domready?
Well with the current patch, the first set of widgets don't initialise until the tab is ready.
Change 458866 merged by jenkins-bot:
[mediawiki/core@master] Lazy-infuse OOUI widgets by tab
given no infusion happens until after tabs are ready, I don't think it's'a major issue anymore