Jump to content

User:Johnuniq/Moderate using loadData

From Wikipedia

Performance results

[edit]

Following is an investigation of how much Lua execution time is required to do a moderate number of conversions. This page, uses Template:Convert which invokes Module:Convert in a way that means it will use mw.loadData to read Module:Convertdata (it will not use require).

Previewing this page before saving showed the following in the HTML source:

NewPP limit report
Preprocessor visited node count: 133/1000000
Preprocessor generated node count: 719/1500000
Post-expand include size: 1850/2048000 bytes
Template argument size: 0/2048000 bytes
Highest expansion depth: 2/40
Expensive parser function count: 0/500
Lua time usage: 0.051s
Lua memory usage: 2.14 MB

Johnuniq (talk) 07:33, 5 March 2013 (UTC)

Moderate test

[edit]

Following are 10 calls to {{convert}} from w:Template:Convert/testcases.

Wikitext Result
{{convert|1|ft/s2|lk=on}} 1 foot per second squared (0.30 m/s2)
{{convert|1|m/s2|ft/s2|lk=on}} 1 metre per second squared (3.3 ft/s2)
{{convert|1|km/h/s|lk=on}} 1 kilometre per hour per second (0.62 mph/s)
{{convert|1|m/s2|km/h/s|lk=on}} 1 metre per second squared (3.6 km/(h·s))
{{convert|1|km/hs|lk=on}} 1 kilometre per hour per second (0.62 mph/s)
{{convert|1|m/s2|km/hs|lk=on}} 1 metre per second squared (3.6 km/(h·s))
{{convert|1|m/s2|lk=on}} 1 metre per second squared (3.3 ft/s2)
{{convert|1|acre|lk=on}} 1 acre (0.40 ha)
{{convert|1|m2|acre|lk=on}} 1 square metre (0.00025 acres)
{{convert|1|m2|acre ha|lk=on}} 1 square metre (0.00025 acres; 0.00010 ha)