Page MenuHomePhabricator

Phase out the "mediawiki.page.startup" module
Closed, ResolvedPublic

Description

This is spun-off from T233676, where this was previously considered. At the time it was blocked on other changes and thus taken out of that sprint in favour of other improvements.

Motiviation

The mediawiki.page.startup is a fairly simple module. It exists for internal use, is never depended on, implements a few miscellanous core contracts. Specifically:

  • Enforce the security feature as configured by OutputPage::getFrameOptions (via mw.config wgBreakFrames).
  • Fire the wikipage.diff hook as needed.
  • Fire the wikipage.content hook as needed.

This can't be lazy-loaded and also isn't limited to a unique user context. Far from it, it's loaded unconditionally on all page views. This means it can either go into an exisiting (small) narrow deliverable that we can effort to load more widely, or into an existing deliverable that has the same needs.

Most obvious seems its sibling, mediawiki.page.ready. In fact, these once were the same module long ago, but were split as a micro-optimisation for what was once the "synchronous top queue" (where startup.js was in the sync top, and ready.js in the async bottom).

But with T107399 and T109837 behind us, this distinction no longer exists (all code is now async), and thus they can easily be merged.

Event Timeline

Change 574133 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/core@master] Merge mediawiki.page.startup.js into mediawiki.page.ready

https://gerrit.wikimedia.org/r/574133

Change 619601 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/core@master] mediawiki.page.ready: Simpler tablesorter/makeCollapsible call

https://gerrit.wikimedia.org/r/619601

Change 574133 merged by jenkins-bot:
[mediawiki/core@master] mediawiki.page.startup: Merge with mediawiki.page.ready module

https://gerrit.wikimedia.org/r/574133

Change 619601 merged by jenkins-bot:
[mediawiki/core@master] mediawiki.page.ready: Simpler tablesorter/makeCollapsible call

https://gerrit.wikimedia.org/r/619601

Change 574134 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/core@master] Remove unused 'mediawiki.page.startup' alias

https://gerrit.wikimedia.org/r/574134

Krinkle triaged this task as Medium priority.
Krinkle moved this task from Inbox to Blocked (old) on the Performance-Team board.

Change 574134 merged by jenkins-bot:
[mediawiki/core@master] Remove unused 'mediawiki.page.startup' alias

https://gerrit.wikimedia.org/r/574134