Page MenuHomePhabricator

Put wrapped data in mw.loadData cache
Closed, DeclinedPublic

Description

Each time mw.loadData is called, it calls dataWrapper at the end. Maybe it would make more sense to put the wrapped data in the cache?

Also, maybe this could make table lookup significantly faster, because the seen variable in dataWrapper would be have to be fed only once.

if not data then
    ...
    data = dataWrapper(data)
    loadedData[module] = data
end
return data

https://github.com/wikimedia/mediawiki-extensions-Scribunto/blob/master/engines/LuaCommon/lualib/mw.lua

Event Timeline

Od1n created this task.Oct 16 2016, 3:32 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 16 2016, 3:32 AM
Od1n updated the task description. (Show Details)Oct 16 2016, 3:42 AM
Jackmcbarn closed this task as Declined.Oct 16 2016, 4:46 PM
Jackmcbarn added a subscriber: Jackmcbarn.

Passing the same dataWrapper result more than once would introduce another way that T67258 could happen.