Page MenuHomePhabricator

ReadingDepth refactor - exit early for incompatible browsers
Closed, ResolvedPublic3 Estimated Story Points


During code-review of 443569 , some potential performance optimizations to the ReadingDepth.js code were identified. See:

Specifically, it would be beneficial to exit the function early when a browser don't support event-logging (or sendBeacon specifically). That would avoid unnecessarily accessing localStorage to get the value of mw.user.sessionId. To achieve this, some logic should be factored out to check for browser-compatibility first, before deciding whether to enable the logging.

Event Timeline

Change 444600 had a related patch set uploaded (by Jdrewniak; owner: Jdrewniak):
[mediawiki/extensions/WikimediaEvents@master] Refactor readingDepth to exit early for incompatible browsers

This is blocking review on T201124 so pulling in. Have kicked off an async estimation.

Jdlrobson set the point value for this task to 3.Aug 22 2018, 5:14 PM

We settled on a 3 here given testing risk required to ensure ReadingDepth is working as expected.

Change 444600 merged by jenkins-bot:
[mediawiki/extensions/WikimediaEvents@master] Refactor readingDepth to exit early for incompatible browsers

QA will be handled in T191532?