Help:Template limits: Difference between revisions

Content deleted Content added
Special:Expandtemplates: update safesubst code to avoid "|=foo" bug
How can you find out?: update sample comment and explanatory text
Line 21:
 
===How can you find out?===
Once the page body is processed, an HTML comment is added towards the end of the HTML code of the page with the final values of the various counters. For example, the page [[HIV/AIDS]] (on 8January August1, 20122024) contains the following comment in its generated HTML source:
 
<syntaxhighlight lang="html">
<!--
NewPP limit report
Parsed by mw1416
Preprocessor node count: 173488/1000000
Cached time: 20231227101515
Post-expand include size: 1557895/2048000 bytes
Cache expiry: 2592000
Template argument size: 561438/2048000 bytes
Reduced expiry: false
Highest expansion depth: 29/40
Complications: [vary‐revision‐sha1, show‐toc]
Expensive parser function count: 7/500
LuaCPU time usage: 02.331s767 seconds
Real time usage: 3.151 seconds
Preprocessor visited node count: 17348820971/1000000
Post-expandPost‐expand include size: 1557895928915/20480002097152 bytes
Template argument size: 5614389264/20480002097152 bytes
Highest expansion depth: 2915/40100
Expensive parser function count: 751/500
Unstrip recursion depth: 1/20
Unstrip post‐expand size: 1121339/5000000 bytes
Lua time usage: 1.705/10.000 seconds
Lua memory usage: 1.2510566120/52428800 MBbytes
Lua Profile:
MediaWiki\Extension\Scribunto\Engines\LuaSandbox\LuaSandboxCallback::preprocess 180 ms 10.6%
? 160 ms 9.4%
MediaWiki\Extension\Scribunto\Engines\LuaSandbox\LuaSandboxCallback::callParserFunction 140 ms 8.2%
MediaWiki\Extension\Scribunto\Engines\LuaSandbox\LuaSandboxCallback::plain 140 ms 8.2%
MediaWiki\Extension\Scribunto\Engines\LuaSandbox\LuaSandboxCallback::gsub 80 ms 4.7%
MediaWiki\Extension\Scribunto\Engines\LuaSandbox\LuaSandboxCallback::find 80 ms 4.7%
dataWrapper <mw.lua:672> 80 ms 4.7%
select_one <Module:Citation/CS1/Utilities:426> 80 ms 4.7%
recursiveClone <mwInit.lua:41> 80 ms 4.7%
<mwInit.lua:41> 60 ms 3.5%
[others] 620 ms 36.5%
Number of Wikibase entities loaded: 0/400
-->
</syntaxhighlight>
 
(Some items may not be present on other wikis, depending on which extensions they have installed; for example, the "Lua" items are added by [[mw:Extension:Scribunto|Extension:Scribunto]].)
(On wikis with a Module namespace the items "Lua time usage" and "Lua memory usage" are added to this list.)
 
Because of the way the counters are increased, the firstpreprocessor threevisited countsnode count, post-expand include size, and template argument size will usually be less than thetheir limits. If any of these sizesitems are close to thetheir limit, then it is likely that some of the templates have not been expanded. Each occurrence of an unexpanded template is identified in the page body by an HTML comment containing an error message.
 
Update 1 April 2013:
<syntaxhighlight lang="html">
<!--
NewPP limit report
Preprocessor visited node count: 19190/1000000
Preprocessor generated node count: 94558/1500000
Post-expand include size: 714878/2048000 bytes
Template argument size: 25507/2048000 bytes
Highest expansion depth: 13/40
Expensive parser function count: 13/500
Lua time usage: 0.331s
Lua memory usage: 1.25 MB
-->
</syntaxhighlight>
 
Click "Parser profiling data" at the bottom of a preview to see similar data for the preview without saving it.