hoo added a comment. A problem I came across while poking at this is that we would need to call out to `EntityLookup::hasEntity` on every `mw.wikibase.getEntityObject` call to verify the entity exists (because that function returns `nil` in case the entity doesn't exist). If we need to unstub the entity later on, we would again need to get similar (but not the same) metadata from MariaDB to actually load the entity. That would make two database queries from one to load the entity into Lua. If people load more than a few entities into Lua, that could actually slow down page rendering significantly.
If we had a batch lookup and could in process cache/ buffer the entities we need for Lua this could be preloaded in one go, but we're not there, yet. TASK DETAIL https://phabricator.wikimedia.org/T76156 REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>. EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: hoo Cc: Liuxinyu970226, aude, Lydia_Pintscher, daniel, hoo, Wikidata-bugs, GWicke _______________________________________________ Wikidata-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
