Template talk:TagKey
Lua rewrite
I've rewritten this template to be based on Module:Tag instead of wikitext. In general, there should be no difference to the input or output, other than a minor invisible change to the rendered HTML syntax, but some aspects of performance should improve under the new implementation. The difference should be significant on pages that transclude this template many times. The following comparisons reflect both the change proposed here and the ones proposed in Template talk:Tag#Lua rewrite and Template talk:TagValue#Lua rewrite. I also replaced {{Keylink}} and {{Valuelink}} to demonstrate that those templates are overkill for discovering key and value description pages.
− | NewPP limit report
Cached time: | + | NewPP limit report
Cached time: 20240425183407 Cache expiry: 86400 Reduced expiry: false Complications: [show‐toc] CPU time usage: 1.393 seconds Real time usage: 3.057 seconds Preprocessor visited node count: 9498/1000000 Post‐expand include size: 66782/2097152 bytes Template argument size: 3497/2097152 bytes Highest expansion depth: 22/100 Expensive parser function count: 7/500 Unstrip recursion depth: 0/20 Unstrip post‐expand size: 0/5000000 bytes Lua time usage: 1.610/15 seconds Lua virtual size: 7294976/52428800 bytes Lua estimated memory usage: 0 bytes Number of Wikibase entities loaded: 0/250 Transclusion expansion time report (%,ms,calls,template) 100.00% 2272.115 1 -total 49.22% 1118.316 135 Template:TagValue/sandbox 21.78% 494.916 47 Template:Tag/sandbox 15.57% 353.697 3 Template:Icon 15.40% 349.963 3 Template:LangSwitch 15.22% 345.717 3 Template:LangSwitch/langcode 12.70% 288.605 8 Template:LL 12.52% 284.451 42 Template:LangPrefix 11.25% 255.687 84 Template:Langcode 5.77% 131.162 10 Template:TagKey/sandbox |
− | NewPP limit report
Cached time: | + | NewPP limit report
Cached time: 20240425183732 Cache expiry: 86400 Reduced expiry: false Complications: [show‐toc] CPU time usage: 1.281 seconds Real time usage: 4.074 seconds Preprocessor visited node count: 6712/1000000 Post‐expand include size: 122054/2097152 bytes Template argument size: 4502/2097152 bytes Highest expansion depth: 23/100 Expensive parser function count: 10/500 Unstrip recursion depth: 0/20 Unstrip post‐expand size: 7926/5000000 bytes Lua time usage: 2.780/15 seconds Lua virtual size: 7729152/52428800 bytes Lua estimated memory usage: 0 bytes Number of Wikibase entities loaded: 0/250 Transclusion expansion time report (%,ms,calls,template) 100.00% 3676.581 1 -total 76.47% 2811.342 283 Template:Tag/sandbox 6.05% 222.360 27 Template:TagValue/sandbox 5.88% 216.280 35 Template:TagKey/sandbox 3.63% 133.464 1 Template:Feature 2.91% 107.055 41 Template:Langcode 2.65% 97.537 1 Template:Infobox_small 1.89% 69.539 1 Template:Languages 1.44% 52.931 7 Template:LangSwitch 1.09% 39.995 8 Template:Key |
− | NewPP limit report
Cached time: 20240425154204
Cache expiry: 86400
Reduced expiry: false
Complications: [show‐toc]
CPU time usage: | + | NewPP limit report
Cached time: 20240425154204 Cache expiry: 86400 Reduced expiry: false Complications: [show‐toc] CPU time usage: 0.906 seconds Real time usage: 1.837 seconds Preprocessor visited node count: 17099/1000000 Post‐expand include size: 187598/2097152 bytes Template argument size: 8756/2097152 bytes Highest expansion depth: 24/100 Expensive parser function count: 12/500 Unstrip recursion depth: 0/20 Unstrip post‐expand size: 2/5000000 bytes Lua time usage: 0.880/15 seconds Lua virtual size: 8896512/52428800 bytes Lua estimated memory usage: 0 bytes Number of Wikibase entities loaded: 3/250 Transclusion expansion time report (%,ms,calls,template) 100.00% 1586.358 1 -total 60.43% 958.644 1 Template:KeyDescription 29.22% 463.548 45 Template:LangSwitch 25.02% 396.963 42 Template:LangSwitch/langcode 22.98% 364.478 45 Template:Tag/sandbox 21.72% 344.635 1 Template:DescriptionLinks 21.37% 338.993 1 Template:TaginfoLinks 21.19% 336.174 103 Template:Langcode 19.89% 315.575 31 Template:TaginfoLinksPerLanguage 5.83% 92.427 7 Template:DescriptionLang |
The Lua module is passing a battery of tests, but more test cases are always welcome. If no showstopping issues are identified, I'd like to deploy these two rewrites soon so we address some of the performance problems that have been identified on large pages.
– Minh Nguyễn 💬 16:50, 14 April 2024 (UTC)
- Resolved: I've deployed the changes. – Minh Nguyễn 💬 07:09, 7 May 2024 (UTC)