AFAIU current implementation of mw.wikibase.entity.lua implies loading of the whole entity into memory both for mw.wikibase.label() and mw.wikibase.sitelink() LUA functions. Using those functions 10 times on single pages means loading 10 enities to memory.
There should be 2 server-side (db-side? 10k limited memory-side?) caches Q->label and Q->sitelink for local language as most used ones. Those caches should be used instead of internal call to getEntityObject(), unless we checking the current entity.
Version: unspecified
Severity: normal
Whiteboard: u=dev c=backend p=0