Template:Ph:Template
From Wikipedia, the free encyclopedia
See also Wikipedia:Template messages.
[edit] Troubles with noinclude
The noinclude-tag, from MediaWiki language version 1.6, coded as "<noinclude>" does not function as might be expected. Although the tag name might imply that the text is omitted ("not included"), the opposite is happening during processing. The nonincluded text is buffered, behind the scenes, for potential error messages, and is accumulated from all templates that are processed, with the accumulation growing each time a template is transcluded in a page.
To handle the condition of a missing slash end-tag (missing "</noinclude>"), all of the nonincluded text is included in the processing buffers, and upon end-of-file, all of the non-included text will be thrown into the page buffer. This "error-reporting" tactic requires that every character of non-included text cannot be omitted, but must be, instead, carefully included for display when an error condition occurs.
Because the "nonincluded" text (after "</noinclude>") is painstakingly included in the processing buffers, unwanted text should be kept in other files, such as a "/doc" sub-file to describe template performance. Excessive nonincluded text can clog the processing buffers and cause templates to go haywire and block the further processing of if-expressions and similar language within other included templates.
Descriptive text has already been split from some common templates, such as vertical-bar templates Template:! and Template:!! (back on 19-Aug-2006 & 4-Oct-2006), to avoid clogging limited resources. Such common templates use "{{template doc}}" to display the related "/doc" sub-files, when viewed as non-included pages.
Summary: In spite of the noinclude-tag ("</noinclude>"), every single character will be kept and retained internally, from all templates used, for the duration of template processing for a page.
[edit] Interwiki links clog templates
Similar to other text in a file, any interwiki language-links (such as "[[de:deutsche Sprache]]" also fill the template-processing buffers, detracting from resources available to process multiple templates. For most templates, the clogging effects of interwiki language-links are minimal; however, with heavily-used templates (such as vertical-bar exclamation "{{!}}"), the cumulative effects, of retaining many "nonincluded" interwiki links, can kill template processing. In actual tests, as few as 14 interwiki links were too many for a map-definition template used by "Template:Location_map_many". As a result, interwiki links should be moved to the associated "/doc" subfile for a heavily-used template.
Summary: for most templates, used only a few times per page, the interwiki language-links are not a problem; however, for multiply used templates, the interwiki links can be fatal for repeated template usage within a page.