Wikipedia:Post-expand include size

This essay describes the MediaWiki parser handling of the resource known as the "post-expand include size" of the text passed from templates and other transcluded content.

The post-expand include size is the sum of the lengths of the expanded wikitexts generated by transcluded pages (e.g., templates and modules), parser functions, and variables. For years, the limit of the post-expand size has been 2,097,152 bytes (221 bytes), or 2,048 KiB as determined by. Pages which exceed this limit are automatically categorized into Category:Pages where post-expand include size is exceeded.

How to see the current post-expand size
Edit the page, then find "Parser profiling data: (help)" almost at the bottom of the page in mode. The parser profiling data is just above the category links and the fine-print privacy policy and disclaimers, etc. links. You may need to click on the drop-down arrow to show the table. Post-expand include size is one of the items listed in the parser profiling data.

Calculating post-expand size
When a template returns some generated or displayed text, every character counts in the post-expand include size. Also, text returned by a  or   parser function counts double; for example, the 4-letter string "ABCD" returned from a   function would count as 8 letters (8 bytes). When displayed by a  also around a nested , each character counts triple, and so "ABCD" would count as 12 letters.

Each internal space counts as 1 byte per level
Each internal space adds one more at each level, where double-nested "AB CD" as 5 bytes would use 15 bytes in post-expand size, but triple-spaced "<tt>AB  CD</tt>" (as <tt>7</tt> bytes) would use <tt>21</tt> bytes of post-expand size, when double-nested as the result of a   inside an   function.