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 created this task.Jan 31 2016, 8:21 PM
hoo updated the task description. (Show Details)
hoo raised the priority of this task from to Needs Triage.
hoo added subscribers: hoo, daniel, aude.
Restricted Application added subscribers: StudiesWorld, Aklapper. · View Herald TranscriptJan 31 2016, 8:21 PM
hoo updated the task description. (Show Details)Jan 31 2016, 9:45 PM
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.

hoo updated the task description. (Show Details)Jan 31 2016, 9:49 PM
hoo updated the task description. (Show Details)Feb 1 2016, 5:01 PM
samuwmde triaged this task as Low priority.Feb 7 2018, 3:28 PM
samuwmde added a subscriber: samuwmde.

Hej Marius is this still relevant?

hoo moved this task from Incoming to To do later on the Wikibase-Lua board.Apr 12 2018, 1:57 PM
hoo closed this task as Declined.Apr 16 2019, 5:24 AM

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.

daniel removed a subscriber: daniel.Apr 16 2019, 9:27 AM