We spend about 4-500ms infusing widgets that aren't even visible in the first tab.
- Mentioned In
- T206143: Slow response of new preferences UI: Shows content of all tabs on a single page for a moment
T204111: Language widget on Special:Preferences is slow to load
T203984: Upon reloading Special:Preferences page loads the first tab and then switches to previously opened tab
T180538: Improve Special:Preferences UI/UX
- Mentioned Here
- T204111: Language widget on Special:Preferences is slow to load
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-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.