Last modified: 2013-12-04 11:39:54 UTC
Wikibase\EntityView::getBasicEntityInfo currently loops over all referenced entities, loads each of them, and then generates a serialization only containing labels, descriptions and data types (see EntityRevisionSerializer::newForFrontendStore). This is causing serious performance issues (in terms of time as well as memory). The solution would be to load labels and descriptions from the terms table, and the data type from the property_info table. We'll also have to grab the revision info from the page table (joining against entity_per_page).
Change 94738 merged by jenkins-bot: (bug #56903) Introducing EntityInfoBuilder https://gerrit.wikimedia.org/r/94738
Verified in Wikidata demo time.