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,867 10.05%% / 18,380 25.15%% / 45,984 6.58%% / 12,037 16.08%% / 29,397 6.06%% / 11,077 20.83%% / 38,097 11.35%% / 20,761
Belgium 213,599 14.31%% / 30,558 9.24%% / 19,733 7.39%% / 15,789 19.63%% / 41,926 12.15%% / 25,949 17.09%% / 36,511 15.39%% / 32,881
Denmark 229,297 7.62%% / 17,470 10.82%% / 24,803 10.92%% / 25,050 14.14%% / 32,421 16.65%% / 38,177 17.76%% / 40,718 18.53%% / 42,480
France 278,344 7.42%% / 20,640 17.61%% / 49,012 6.35%% / 17,662 16.66%% /46,363 14.58%% / 40,569 15.06%% / 41,917 19.61%% / 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]