टेम्पलेट:Show data: रिवीजन सभ के बीचा में अंतर

Content deleted Content added
छोNo edit summary
→‎Creating new data templates: ==Efficiency== In this template system each template contains various properties of a single entity, as opposed to the other common system, where a template contains
लाइन 115:
{{refs}}
<includeonly>[[Category:Data templates|{{if||{{{country|}}}|{{{country}}} {{{1}}}|{{if|eq|{{{type}}}|continent| {{{1}}}|{{if|eq|{{{1}}}|world| |{{{1}}}}}}}}}]]</includeonly><noinclude>[[Category:Data retrieval templates]]</noinclude>
 
==Efficiency==
In this template system each template contains various properties of a single entity, as opposed to the other common system, where a template contains one property (e.g. population or area) of many entities.
 
Although it is convenient if data likely to be changed at the same time (because updates become available together) are in the same data template, in the case of large-scale use of data on one page that other system can be problematic due to its inefficiency. This is because of the following:
*There are often more entities than properties, and [[wp:template limits|page counts]] (or in the case of <code>#switch</code>, average page counts) are proportional to the number of data items in the data template (if they are stored in a linear way, not in a tree, and not stored as unnamed parameters).
*In the case of large-scale use of data on one page there are usually one or more tables, where an entity forms a row and a property a column, because there are often more entities than properties, and because this way the sorting feature allows sorting entities based on a property. In this template system this allows producing a row with only one call of the data template, making the count not grow faster than proportional to the average number of data items stored per data template, times the number of entities in the table.
 
Until here the documentation is automatically generated by [[Template:Show data]].