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

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 22 2018, 11:56 AM

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

Jdlrobson added a subscriber: jan.

Thanks @jan!!

Jdlrobson triaged this task as High priority.Aug 22 2018, 3:10 PM

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

Jdlrobson closed this task as Resolved.Aug 22 2018, 7:07 PM

QA will be handled in T191532?

Krinkle awarded a token.
Krinkle moved this task from Limbo to Watching on the Performance-Team (Radar) board.