I have put some interesting performance tests at
my test2 talk to compare your mw.loadData
with require
when reading data from a large module. My write up is a bit rushed, so it's possible I've blundered somewhere, but loadData appears to be much faster (obviously) when a template is called many times on a page, but is a bit slower when called only 10 times (however, 10 calls takes very little time, so a little bit slower is not an issue). Thanks.
Johnuniq (
talk)
09:51, 5 March 2013 (UTC)
require
are slightly faster due to the overhead in the indirection required to make the data read-only for mw.loadData
, and the initial load of the data is slower because it runs through the table making sure no unsupported values are returned.action=parse&text=...
. I got a mean reported "Lua time usage" of 0.0523s for the 10×require test and 0.0465s for the 10×loadData test; the minimum times recorded were 0.038s versus 0.032s, and the maximums were 0.066s versus 0.057s, respectively. That would indicate that loadData is slightly faster in {{convert}}
even for only 10 calls per page. The 2× test, on the other hand, did come out slower for loadData. If we want to get a more rigorous analysis, we'd probably need to find someone who actually remembers anything about statistics.
BJorsch (WMF) (
talk)
14:56, 5 March 2013 (UTC)
mw.loadData
is very clear—the benefit is enormous.
Johnuniq (
talk)
21:01, 5 March 2013 (UTC)This proposal by jackmcbarn is potentially very useful and seems stalled. Can you help move it along please? Many thanks, Roger Davies talk 11:49, 18 June 2015 (UTC)
hi
Aberdxxner (
talk)
22:16, 7 February 2017 (UTC)
@ BJorsch (WMF): Hi Brad, I'm just trying to upload a file to Commons using the API and curl. Logging in and getting the CSRF token is easy, but how do I actually upload? May you please give an example, how to POST a file?-- USS New Jersey ( talk) 10:55, 4 April 2017 (UTC)
I love your work that do for the world thank you
Kameroon1 (
talk)
15:42, 13 December 2018 (UTC)
The Detective Barnstar | ||
For tracking down the cause of T210739 and coding the fix for it. You're an MVP (most valuable programmer)! wbm1058 ( talk) 20:29, 25 January 2019 (UTC) |