Page MenuHomePhabricator

Prefetch data needed for page rendering based on usage tracking data
Closed, DeclinedPublic

Description

Based on the data we have in usage tracking we can (not completely, but close enough) reproduce what resources will be loaded from the repo, thus we can preload these in one go.

This has been discussed before and I just looked into this again, thinking it was easy to implement and could probably save us some time on page rendering as entity usage barely (fundamentally) changes.

One way to do this would be to have a central service which individual prefetchers can sign up with for prefetching. The downside of that is, that it will probably require quite some abstraction (I didn't yet think of an exact design, but I guess we would need to have at very least one extra class per type of prefetcher and an interface). Also it seems difficult to pass the state (the cached data) between that service and the actual users, especially given the many places we use instantiate term lookups during page rendering right now (for the parser function and Lua).

We need to keep in mind that we potentially have labels in many languages in usage tracking (on multilingual wikis), but that shouldn't be an issue here, as we can just preload the labels for the language we are needing a label description lookup for (as these are limited to one language and are either the content language or the user language).

Event Timeline

hoo raised the priority of this task from to Needs Triage.
hoo updated the task description. (Show Details)
hoo added subscribers: hoo, daniel, aude.
hoo set Security to None.

I just looked at the code in question some more and I think we need to go with a more complex design here. Updated the description accordingly.

samuwmde subscribed.

Hej Marius is this still relevant?

Hej Marius is this still relevant?

While I think this is still a good thing to consider, it doesn't solve an immediate problem, so let's not do this for now.