Page MenuHomePhabricator

LUA functions mw.wikibase.label and mw.wikibase.sitelink should not load the whole entity into memory
Closed, ResolvedPublic


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



Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 3:51 AM
bzimport set Reference to bz71743.
bzimport added a subscriber: Unknown Object (MLST).

gerritadmin wrote:

Change 171992 had a related patch set uploaded by Hoo man:
Don't load the full entity into Lua to get labels/ sitelinks

gerritadmin wrote:

Change 171992 merged by jenkins-bot:
Don't load the full entity into Lua to get labels/ sitelinks