Page MenuHomePhabricator

Check accuracy of mwLoadEnd
Closed, ResolvedPublic

Description

Since we moved the metric out of core, I suspect it may've become a bit less accurate due to capturing the page load queue at a later time, and due to use of then() where done() should have been used instead.

  • Check current call flow from ext.navigationTiming.js and see whether the marking of mwLoadEnd happens in the same tick of the event loop as the ready marking of the modules it is meant to correlate with
  • (If not) make it so.
  • Check the filtered list of modules that ext.navigationTiming.js comes up in onMwLoadEnd() against the list of modules queued from the <head> and see if it is waiting for modules that it shouldn't. For example, the initial execution of modules that run before NavTiming may've started a chain of lazy-loading modules unrelated to the initial page queue.
  • (If not) make it right.

Event Timeline

Change 460726 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/extensions/NavigationTiming@master] ext.navigationTiming: Make sure setMwLoadEnd() is not deferred

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

At least the first point about then() was quite apparent from timelines I did this week, I'll address that right away.

before-3.png (750×2 px, 398 KB)

after-3.png (824×2 px, 403 KB)

Change 460726 merged by jenkins-bot:
[mediawiki/extensions/NavigationTiming@master] ext.navigationTiming: Make sure setMwLoadEnd() is not deferred

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

Krinkle triaged this task as Medium priority.Sep 17 2018, 11:48 PM

Change 461009 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/core@master] resourceloader: Add internal RLPAGEMODULES constant

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

Change 461015 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/extensions/NavigationTiming@master] ext.navigationTiming: Update mwLoadEnd to use RLPAGEMODULES

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

Change 461009 merged by jenkins-bot:
[mediawiki/core@master] resourceloader: Add internal RLPAGEMODULES constant

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

Change 461015 merged by jenkins-bot:
[mediawiki/extensions/NavigationTiming@master] ext.navigationTiming: Update mwLoadEnd to use RLPAGEMODULES

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