Content deleted Content added
m Pppery moved page Template talk:Tabular data to Module talk:Tabular data over redirect: Sorry, thought this was a module that was used by a template |
→Performance: new section |
||
Line 25:
:::{{ping|Alexis Jazz}} {{done}}, although I'd expect that large or complex tables or lists would be better served by a custom Lua function that interacts with the tabular data directly, since that also affords more control over formatting and allows lookups to be reused. – [[User:Mxn|Minh <span style="font-variant: small-caps;">Nguyễn</span>]] <sup>[[User talk:Mxn|<span style="display: inline-block;">💬</span>]]</sup> 05:14, 21 May 2020 (UTC)
::::{{ping|Mxn}} Thanks, I also updated {{tl|Tabular query}}. I've noticed though that [https://en.wiktionary.beta.wmflabs.org/w/index.php?title=Template:Leesonderzoek&oldid=4120] seemingly took almost a second to preview after I updated the module where it was about half a second before. This was before I updated that template to use the new functionality. Now that I've updated it, it's back taking half a second where I was hoping to get the preview/rendering time down to about 0.3 seconds. - [[User talk:Alexis Jazz|Alexis Jazz]] 06:31, 21 May 2020 (UTC)
== Performance ==
Recently {{ping|Johnuniq}} developed {{tlx|NUMBEROF}} which uses [[c:Data:Wikipedia statistics/data.tab]] generated by GreenC bot. One of the issues we ran into was performance, because each time the template is invoked, the Commons file is retrieved via mw.ext.data.get() which is slow. [[List of Wikipedias]] had over 4,000 invocations which exceeded Lua's 10 second time and rendered red errors. {{ping|Pppery}} suggested a solution to load the Commons file 1 time per page but mw.ext.data.get() does not support this, however mw.loadData() does. So the mw.ext.data.get() is used in {{tlx|NUMBEROF/data}} which is then loaded by mw.loadData() in {{tlx|NUMBEROF}}. It works to ensure the file from Commons is loaded 1 time regardless of how often the module is invoked on a page. Is this an issue with this module? Should we recommend readers to use {{tlx|NUMBEROF}} vs. this template, since it is being used as an example? -- [[User:GreenC|<span style="color: #006A4E;">'''Green'''</span>]][[User talk:GreenC|<span style="color: #093;">'''C'''</span>]] 02:26, 24 May 2020 (UTC)
|