WMDE-leszek created this task.
WMDE-leszek added projects: Wikidata-Ugly-Cat-Trailblaze (wb_terms trail blazing), Wikidata.
Herald added a subscriber: Aklapper.

TASK DESCRIPTION

PrefetchingTermLookup interface, with its simplest implementation BufferingTermLookup combine TermLookup and TermBuffer interfaces.

Apparently, the "prefetching"/buffering is done for LabelDescriptionLookup services, so that when the label/description of particular item/property is to be shown multiple times (e.g. the item appears several times on a page), the label/description is only fetch ones from the storage, and then kept in a in-memory buffer until the end of request.
This makes sense, but the way it is done is a bit cumbersome. LabelDescriptionLookup itself does not hold any buffer. It gets label/description of the entity from TermLookup. As all LabelDescriptionLookup instances used get PrefetchingTermLookup (ie. lookup that is also a TermBuffer) in their constructor, label/description lookups "magically" use buffered term-lookups.

In the course of T196882 LabelDescriptionLookup implementation(s) are being added that not rely on TermIndex/wb_terms table. In the case of "prefetching" those could be also doing per-process buffering, removing the need of using wb_terms for fallback in "prefetching".

Idea to try out under umbrella of this task: make LabelDescriptionLookup buffer itself, and explicitly. If possible remove PrefetchingTermLookup/TermBuffer, unless they are used by other services too (not-that-extensive check by @WMDE-leszek suggests they are not).


TASK DETAIL
https://phabricator.wikimedia.org/T198868

WORKBOARD
https://phabricator.wikimedia.org/project/board/3407/

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: WMDE-leszek
Cc: Aleksey_WMDE, WMDE-leszek, Aklapper, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, Wikidata-bugs, aude, Mbch331
_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to