Jump to content

Template talk:Section length

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Substability

[edit]

Not currently substable, but needs to be so we can take a snapshot in time of the length of a section. Should not be force-subst, though, because we want the ability for it to be dynamic as well; so should end up as, "may be substituted" but we are not there yet. Mathglot (talk) 05:33, 21 September 2024 (UTC)[reply]

Preview of a use case

[edit]

This should ultimately be generated with a for loop and a row iterator for a fuller version, but here's a hard-coded version, to give an idea of the possibilities with this template:

Comparison of seven sections commonly found in country articles:
Section ⟶
↓ Country
Lead History Geography Government
and politics
Economy Demographics Culture
Austria 182,819 10.05%% / 18,380 25.15%% / 45,984 6.58%% / 12,037 16.08%% / 29,397 6.06%% / 11,077 20.84%% / 38,097 11.33%% / 20,713
Belgium 213,543 14.31%% / 30,558 9.24%% / 19,733 7.39%% / 15,789 19.63%% / 41,926 12.13%% / 25,893 17.10%% / 36,511 15.40%% / 32,881
Denmark 229,386 7.62%% / 17,470 10.81%% / 24,803 10.92%% / 25,050 14.13%% / 32,422 16.62%% / 38,121 17.81%% / 40,862 18.52%% / 42,480
France 278,654 7.51%% / 20,930 17.59%% / 49,007 6.34%% / 17,662 16.65%% /46,397 14.56%% / 40,566 15.04%% / 41,917 19.58%% / 54,570

An extended version of this table is at Wikipedia:WikiProject Countries/Common section size (slow to load).

Note that the Government and politics section is not always called that, in particular, in Belgium and France it is not. This uses about 1% of PEIS (negligible) and 1.184 sec. of CPU usage. A page with six such tables rendered, but failed on the seventh. With six tables, it uses negligible PEIS, and 8.091 CPU seconds, for 14 module invocations per row, times 24 rows, or 336 invocations. Mathglot (talk) 08:41, 21 September 2024 (UTC)[reply]