Category:Pages with too many expensive parser function calls

From OpenStreetMap Wiki
Jump to navigation Jump to search

This category is populated automatically by the MediaWiki software (see Special:TrackingCategories). It lists articles that issue too many expensive parser function calls. Expensive function calls include notably:

  • {{#ifexist: Full page name | ... | ... }} and
  • {{PAGESINCATEGORY: Category name }}.

These pages (or the templates they call) should perhaps be edited to reduce the number of expensive calls.

Currently this wiki only allows less than 500 expensive function calls per page. For a very long time, this limit was set to 100 (default) as the wiki was running on limited resources. This was finally changed in September 2018 [1]. The limit is defined by $wgExpensiveParserFunctionLimit in the internal MediaWiki configuration variables for the local wiki).

Note that multiple calls in the same current page to {{#ifexist: Full page name | ... | ... }} for the same tested page name are counted only once as their results are cached and reused (this test is performed only once). This limit may be easily exhausted sometimes by some navigation templates, which should be tuned to reduce the number of tests performed as much as possible by being more selective about what they will display, or by using them with a flag parameter that will avoid using page existence tests even if they generate some "red" links, and by avoiding overcategorisation with multiple categories tested independantly (this may happen when testing the existence of categories for geographic places: those templates need to be fixed).

It is technically possible to avoid the #ifexist: test (and speedup the rendering on server) if the Full page name to test is the same as the full pagename of the current page being rendered (this is still counted as expensive by MediaWiki, even though it is not as the tested page necessarily exists!), just replace:

  • {{#ifexist: Full page name | ... | ...}} by
  • {{#if{{#ifeq:{{FULLPAGENAME}}|{{FULLPAGENAME: Full page name }}||exist}}: Full page name | ... | ... }}

On this wiki, this error typically happens when the {{Tag}} template is frequently included in the page; you can fix this by adding explicit |kl = or |vl = parameters where there is tag documentation in the same language as the page.

  • It currently happens within translated pages (not in English pages) that include many inclusions of {{Tag}} because this attempts to detect if a translated "lang:Tag:*=*" or "lang:Key:*" exists in order to render a link to that translated page, instead of the default page in English. However this is "safe" for this template because the test with the expensive #ifexist parser function will return false if there are too many, and then only a link to the English page will be returned.
  • There's no easy way to fix that, except by adding a parameter to {{Tag}} to force the translated link to be returned unconditionally (without testing its existence: in that case a red link could be generated to the inexistent translated "Key:" or "Tag:" page, even if an English page exists for the same key or tag). This can be done by setting the explicit |kl = and/or |vl = parameters to {{Tag}} with a valid non-empty language code; or specify |kl = en explicitly to link unconditionally to the English "Key:" page, or |vl = en for the English "Tag:" page for the value).
  • If a tag value has no associated tag description page at all (and should not have one created), such as a sample descriptive value with an infinite number of other possible values (e.g. values for name=* or opening_hours=*), do not pass this value in the second parameter of {{Tag}} but in the third one: no link (not even red links for missing pages) will be generated and no test will be performed to see if a documentation page exists for the tag with this key/value pair. You don't need any
Update (89616) - The Noun Project.svg

This maintenance category may be occasionally empty. The empty category should not be deleted however, because it is needed for maintenance.

Artworkbean broom.svg