Page MenuHomePhabricator

NewImpact: Export app data from server-side render
Open, MediumPublic

Description

The instrumentation patch in T323160: NewImpact module: Instrumentation loads cached impact data when rendering the NewImpact module. Since we already access this data, I think it would make sense to export it to the client-side if it passes the "staleness" check (UserImpactHandler checks to see if page view data is older than 2 days).

  • If it's stale, don't export anything and the useUserImpact.js would make an HTTP request to fetch data like it currently does.
  • If it isn't stale, then useUserImpact.js wouldn't need to make any HTTP request, and we'd have a faster load time. A response with page view data is ~10kB, which isn't nothing, but is likely less expensive than an HTTP round-trip.

Event Timeline

Change 860528 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/extensions/GrowthExperiments@master] NewImpact: Export user impact data from server-side

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

Change 860529 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/extensions/GrowthExperiments@master] [WIP] NewImpact: Load server-side data when available

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

Change 860528 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] NewImpact: Export user impact data from server-side

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

Change 860529 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] NewImpact: Load server-side data when available

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