Page MenuHomePhabricator

Prefetch labels on history pages
Closed, DeclinedPublic

Description

When applying the "link rewrite" magic to the history page, we should prefetch all the labels we need, like we already do for watchlist and recentchanges.

LabelPrefetchHookHandlers is triggered by the ChangesListInitRows hook for watchlist and recentchanges. A similar hook, probably in HistoryPager, would be needed to do the same for history pages.

Event Timeline

daniel assigned this task to hoo.
daniel raised the priority of this task from to High.
daniel updated the task description. (Show Details)
daniel added subscribers: gerritbot, hoo, Ricordisamoa and 6 others.
daniel set Security to None.

Blocked on core patch that introduces the hook we'll use to trigger the pre-fetching: Ie10ef99154d

Change 204526 had a related patch set uploaded (by Daniel Kinzler):
Introduce PageHistoryPager::doBatchLookups hook.

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

Change 204526 merged by jenkins-bot:
Introduce PageHistoryPager::doBatchLookups hook.

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

For the record, now that the hook exists in core, we still need code that hooks in and does the pre-fetching.

I just looked at this for a bit and it seems like we only prefetch the labels of the entities that have been changed (eg. on Special:RecentChanges), but we never prefetch any data of the entities that are being referred to (in the comments). Due to that I'm not really sure how useful that kind of prefetching would be for history pages/ individual diffs... probably not worth the hazel.

hoo claimed this task.

This doesn't make sense, we need to actually fix T97126 (per above and the discussion on Thursday).