Ladsgroup created this task. Ladsgroup added projects: Wikidata-Campsite (Wikidata-Campsite-Iteration-∞), Wikidata, Performance Issue. Restricted Application added a subscriber: Aklapper.
TASK DESCRIPTION After profiling rendering of an item in Wikidata (Q7251) <https://performance.wikimedia.org/xhgui/run/callgraph?id=5e30a7403f3dfa0d2bf6b337>, it turned out 60% of time rendering the item was spent on DatabasePropertyPrefetchingTermLookup. F31538723: image.png <https://phabricator.wikimedia.org/F31538723> One of the problems is that this class loads the all the languages and term types in the properties while actually needing only one language but that's being addressed in I5adf356b <https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Wikibase/+/565258> (not deployed yet) but another problem is that this class is being called one entity by entity and not all of them at once, so it does 500 database queries instead of 5-10 (the call graph says it calls the database::select 492 times) which defies the whole point of having prefetch term lookup in the first place. It's more of "we-cache-as-we-go-term-lookup". This is definitely not wanted, it's a big performance regression and should be fixed. F31538880: image.png <https://phabricator.wikimedia.org/F31538880> Implantation note: EntityReferenceExtractor can be used to collect all of entities used in the item for rending to batch the lookup TASK DETAIL https://phabricator.wikimedia.org/T243912 WORKBOARD https://phabricator.wikimedia.org/project/board/3539/ EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Ladsgroup Cc: Lucas_Werkmeister_WMDE, WMDE-leszek, Jakob_WMDE, darthmon_wmde, Lydia_Pintscher, Aklapper, Ladsgroup, Iflorez, alaa_wmde, Nandana, Lahi, Gq86, Darkminds3113, GoranSMilovanovic, QZanden, LawExplorer, Vali.matei, _jensen, rosalieper, Scott_WUaS, Jonas, Volker_E, Wikidata-bugs, aude, GWicke, Dinoguy1000, Mbch331, Jay8g
_______________________________________________ Wikidata-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
