Page MenuHomePhabricator

Prefetch labels on history pages
Closed, DeclinedPublic


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 created this task.Apr 10 2015, 10:40 AM
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.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 10 2015, 10:40 AM
daniel removed a project: Patch-For-Review.EditedApr 16 2015, 3:57 PM
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.

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

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

Tobi_WMDE_SW removed hoo as the assignee of this task.Apr 21 2015, 12:15 PM
Tobi_WMDE_SW moved this task from Doing to Backlog on the Wikidata-Sprint-2015-04-21 board.
hoo added a comment.Apr 23 2015, 7:43 AM

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 closed this task as Declined.Apr 24 2015, 12:55 PM
hoo claimed this task.

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

hoo moved this task from Backlog to Done on the Wikidata-Sprint-2015-04-21 board.Apr 24 2015, 1:00 PM