NewPP解析器报告

From mediawiki.org
This page is a translated version of the page NewPP parser report and the translation is 100% complete.

NewPP是“New PreProcessor”的缩写(这是相对于MediaWiki 1.12版本当时的Tim Starling的解析器重写而言)。 其中在维基页面的HTML源代码底部,你能找到一份预解析报告,会说明使用了哪些资源去渲染这个页面,以及相关解析器资源的使用额度情况(例如高开销调用次数、预解析树节点数量)。

在维基媒体站点上,看到的内容类似如下:

<!--
NewPP limit report
Parsed by mw1415
Cached time: 20211017101805
Cache expiry: 1814400
Reduced expiry: false
Complications: []
CPU time usage: 0.258 seconds
Real time usage: 0.323 seconds
Preprocessor visited node count: 1071/1000000
Post‐expand include size: 7262/2097152 bytes
Template argument size: 3243/2097152 bytes
Highest expansion depth: 13/40
Expensive parser function count: 21/500
Unstrip recursion depth: 0/20
Unstrip post‐expand size: 1524/5000000 bytes
Lua time usage: 0.039/10.000 seconds
Lua memory usage: 1448042/52428800 bytes
Number of Wikibase entities loaded: 0/400
-->

接下来是每个模板嵌入 扩展时间报告和带有解析器缓存键的调试消息。

它还可以作为JavaScript配置变量wgPageParseReport使用,并在使用维基文本编辑器时以编辑预览模式显示在编辑窗口下(作为名称“解析器分析数据”下的下拉列表)。

参见w:Wikipedia:Template limits能了解更多报告的详细说明。

參見