Module talk:Tabular data: Difference between revisions

Content deleted Content added
Search more than 1 column: minimal version still has similar times
Line 143:
::::::: I've created a function that does the bare minimum (<code>p.lookup2_minimal()</code>, line 208). It doesn't reduce the time substantially (100-150ms depending on run). So I think this sort of template can only be used safely about 50 times on a page.
::::::: For generating tables, the alternative is a module that takes a list of countries like [[Module:Country population]]. A lot more work, but you can get it to do exactly what is needed with appropriate options. —&nbsp;<span style="font-family:Arial;background:#d6ffe6;border:solid 1px;border-radius:5px;box-shadow:darkcyan 0px 1px 1px;">&nbsp;[[User:Jts1882|Jts1882]]&nbsp;&#124;[[User talk:Jts1882|&nbsp;talk]]&nbsp;</span> 09:05, 1 July 2021 (UTC)
:::::::{{tq|Incidentally your template seems to have considerable overhead, both doubling the time and causing a high expansion depth. Using invoke gets the time down to just over 100ms each call.}}
:::::::Can you pinpoint what it is? I invoke the module once if the given date parameter is a year, and twice to interpolate values for a specific date (and once again before those to verify that the country is on the table). What do you reckon needs to be done to reduce the overhead? — [[User:Guarapiranga|𝐆𝐮𝐚𝐫𝐚𝐩𝐢𝐫𝐚𝐧𝐠𝐚]]&nbsp;[[User talk:Guarapiranga|☎]] 08:30, 3 July 2021 (UTC)