mw.widgets.DateInputWidget takes comparably long time to construct, investigate why.
Possible culprits:
- We use tons of OOjs UI ButtonWidgets in the CalendarWidget, see T126784.
- Moment.js functions, look into moment constructor and moment#isSame.
mw.widgets.DateInputWidget takes comparably long time to construct, investigate why.
Possible culprits:
Change 271911 had a related patch set uploaded (by Bartosz Dziewoński):
mw.widgets.DateInputWidget: Don't construct moment() objects when not needed
Change 271912 had a related patch set uploaded (by Bartosz Dziewoński):
mw.widgets.DateInputWidget, CalendarWidget: Lazy-initialize calendar when first shown
Change 271913 had a related patch set uploaded (by Bartosz Dziewoński):
mw.widgets.CalendarWidget: Lazy-initialize calendar buttons too
Turns out that the interface of CalendarWidget is just expensive to construct. Not just the ButtonWidgets (about 5 ms per CalendarWidget), but the whole calendar (about 15 ms per CalendarWidget). Interesting.
Change 271911 merged by jenkins-bot:
mw.widgets.DateInputWidget: Don't construct moment() objects when not needed
Change 271912 merged by jenkins-bot:
mw.widgets.DateInputWidget, CalendarWidget: Lazy-initialize calendar when first shown
Change 271913 merged by jenkins-bot:
mw.widgets.CalendarWidget: Lazy-initialize calendar buttons too