Template talk:Gadget-help

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

too many expensive parser function calls

[edit]

@Tacsipacsi: , I do not know what this template does but a call {{Gadget-help |name=AC/DC |script=Gadget-ACDC|doc=Help:Gadget-ACDC |talk=Help talk:Gadget-ACDC |tech-name=ACDC |lang=de}} made by Help:Gadget-ACDC/de uses up 474 out of 500 allowed "Expensive parser function" calls. Other parts of Help:Gadget-ACDC/de make few other calls and the page ends up with 508 "Expensive parser function" calls and in Category:Pages with too many expensive parser function calls while showing Lua errors. Can this template do whatever needs to be done with much fewer such calls? I see a few "ifexist" in the code but nothing to explain 474 such calls, so it is possible that the expensive calls are done by one of the templates or modules used. Can you help me track it down and fix? --Jarekt (talk) 15:04, 10 March 2021 (UTC)[reply]

@Jarekt: It uses {{Lang links}}, which in turn checks subpages in all 470 languages known to MediaWiki for existence. Nice try… Maybe a solution would be adding a parameter that hides this list, since there’s a non-expensive languages bar at the top anyways. However, the Google Translate link would still be useful, and I don’t know how to achieve this with a good UX. —Tacsipacsi (talk) 23:18, 10 March 2021 (UTC)[reply]
@Tacsipacsi: , That what it is. Thanks for tracking it down. Template:Lang links even has note not to use it directly in the templates, but to create /lang page using {{subst:lle}} and call it. Any chance you can remove it somehow? --Jarekt (talk) 02:10, 11 March 2021 (UTC)[reply]