Nice feature, thanks!
1. I tried to use it in ?debug=1 mode, and it seems to give 0 size to many modules. 2. It would be nice if it would also give details about dependent modules (inclusive size vs exclusive size). for example when using ve with ?debug=1 and inspecting the net panel, it looks like DOS attack with hundreds of requests, and having both the inclusive and exclusive size would allow developers to understand the net effect of loading a module.
Eranroz
On Fri, Oct 11, 2013 at 3:19 AM, Ori Livneh ori@wikimedia.org wrote:
If you are know how to use your browser's JavaScript console, you can now get an ordered list of all ResourceLoader modules that are loaded on the page, sorted by the total size of each module's JavaScript and CSS assets -- simply run "mw.loader.inspect();".
It works best in newer versions of Chromium / Chrome, where it takes advantage of the availability of console.table(). It looks like this: http://i.imgur.com/zGymrsF.png
In the course of testing this feature yesterday, Matt Flaschen spotted and fixed redundant module loading in TimedMediaHandler (see bug 55550). That's pretty cool, no?
Do remember that size != performance, though -- just because a module is small does not mean that it is performant. (The reverse is also true.) This tool also does not account for factors like gzip compression. So no burning developers at the stake, please :) But curious poking is definitely encouraged.
Thanks to Timo & Roan for helping this along.
Ori Livneh ori@wikimedia.org _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l