Page MenuHomePhabricator

Performance improvement: Fetch pageviews asynchronously
Closed, ResolvedPublic

Description

During the update process, one of the slowest steps is fetching pageviews (depending on how many pages are being processed). This is currently done synchronously. The API allows us to make up to 100 requests at the same time. We should take advantage of this. The performance improvement should be in the orders of magnitude.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

This is certainly a "nice to have" and nothing urgent. I'm only logging it here so we don't forget about it.

PR: https://github.com/wikimedia/eventmetrics/pull/288

To give an example, fetching pageviews for https://eventmetrics-dev.wmflabs.org/programs/76/events/370 takes around 2.5 minutes. With the async implementation it takes around 4.8 seconds.

Merged and deployed