Help:Extension:PerformanceInspector

The PerformanceInspector extension collect performance related information from different parts of MediaWiki for a specific article and shows them to you.

How it works
You, as a user, should not worry about site performance. In most cases, there is little you can do to appreciably speed up or slow down the site's servers. But for articles there are sometimes things you can do and the Performance Inspector helps you to collect the metrics you need to figure out if there is anything for a specific page.

Usage

 * Feature moving to "Preferences->Editing" section after 1 May 2018.

You can use the feature by going to the Editing section of your preferences, and enable the "Performance Inspector" feature.

When the Performance Inspector is enabled, you will get a new link in the "Tools" section of the site sidebar. Clicking that link will start the Performance Inspector which will collect and show metrics for the page.

Leave feedback
Please leave feedback at the talk page. It is extremely helpful to provide as much contextual information as you can when reporting issues with the feature.

Metrics
The inspector groups metrics into three different categories:
 * Image metrics
 * Parser profiling metrics
 * Module metrics

Image metrics
The performance inspector collects the size of all images used on a page and shows you the individual sizes. The image size for a page is interesting from a cost perspective for users: Users that pays for bandwidth or have a data limit of how many bytes they can use in month, will save money if we make sure we don't send extra bytes to them.

In parts of the world data is expensive and the inspector eventually wants to highlight the cost for users in a similar way to whatdoesmysitecost.com (small example and large example) and that additional functionality is being looked at in T145123.

Actions
The inspector flags images that are larger than one megabyte, but it is you as a user of the inspector that will take the decision if the image can be smaller. If an image is large, you can check that the DPI is right, that the width/height is ok, and that the image is compressed.

Parser profiling metrics
The parser profiling metrics comes from when the backend server parses the page (picking up the same parser metrics that you can see if you do "view source" of a page and look for  ). These metrics are collected when the server parses the page, which happens at the same time as the page is cached in Varnish for non-authenticated users. Improving these metrics makes the page faster for logged-in users and each time the page needs to be regenerated for an anonymous user.

Actions
In this section you can see what templates are used to to generate the page and how much time is spent on each template. You can read more about Scribunto/Lua templates and follow the instruction in template limits on how to make your templates parse faster.

Resource Loader Module metrics
The module metrics are the same as you can fetch from the JavaScript console by running . These are the modules that the ResourceLoader loads when the page is rendered. You can check the size of each module, how much of the data is loaded from local storage, and the CSS usage.

Actions
Check that the module list looks sane (that the page only loads the modules that are used by the page).

How much of the CSS that is loaded is actually used? You can view which CSS expressions are not used.