Re: [Wikitech-l] Inspecting page performance with mw.loader.inspect()

2013-10-16 Thread Jon Robson
Santosh Thanks for clarifying - as stated before I wasn't picking on this in particular - it was just the easy observation to make from the results. I know very little about ULS but would be keen to understand a bit more about it. Are there any bugs open/wiki pages that I should be subscribed to

Re: [Wikitech-l] Inspecting page performance with mw.loader.inspect()

2013-10-11 Thread Jon Robson
This is interesting Ori - thanks for sharing this / setting it up. Sorry to pick on this example in particular but I was surprised to see so much code for the Universal Language selector (ULS) - especially as a single language speaker I don't ever use any of them - and I am thus being penalised.

Re: [Wikitech-l] Inspecting page performance with mw.loader.inspect()

2013-10-11 Thread Ori Livneh
On Thu, Oct 10, 2013 at 11:50 PM, Jon Robson jdlrob...@gmail.com wrote: This is interesting Ori - thanks for sharing this / setting it up. Thanks for checking it out! Sorry to pick on this example in particular but I was surprised to see so much code for the Universal Language selector (ULS)

Re: [Wikitech-l] Inspecting page performance with mw.loader.inspect()

2013-10-11 Thread Ori Livneh
On Thu, Oct 10, 2013 at 10:03 PM, Eran Rosenthal eranro...@gmail.comwrote: Nice feature, thanks! 1. I tried to use it in ?debug=1 mode, and it seems to give 0 size to many modules. Yep -- already filed as https://bugzilla.wikimedia.org/show_bug.cgi?id=3. I'll fix it. 2. It would be

Re: [Wikitech-l] Inspecting page performance with mw.loader.inspect()

2013-10-11 Thread Jon Robson
As I understand, the 'targets' system was put in place to prevent mobile-inappropriate modules from being loaded by default. But this is not loaded by default; as you point out, there's an explicit mw.loader.using() call that specifies the module by name and causes to be retrieved on demand.

Re: [Wikitech-l] Inspecting page performance with mw.loader.inspect()

2013-10-11 Thread Jon Robson
Sorry to pick on this example in particular but I was surprised to see so much code for the Universal Language selector (ULS) - especially as a single language speaker I don't ever use any of them - and I am thus being penalised. אנחנו במיעוט הקטן בקרב האנושות של דוברי שפות אחרות

Re: [Wikitech-l] Inspecting page performance with mw.loader.inspect()

2013-10-11 Thread Dan Andreescu
Sorry to pick on this example in particular but I was surprised to see so much code for the Universal Language selector (ULS) - especially as a single language speaker I don't ever use any of them - and I am thus being penalised. אנחנו במיעוט הקטן בקרב האנושות של דוברי שפות

Re: [Wikitech-l] Inspecting page performance with mw.loader.inspect()

2013-10-11 Thread Jon Robson
Yup and it's as simple as ... $('little language toothed wheel thing').on('click', function() { mw.loader.using( 'modulename', function() { // do thing with modulename } ); } ); On Fri, Oct 11, 2013 at 1:28 PM, Dan Andreescu dandree...@wikimedia.org wrote: Sorry to pick on this example in

Re: [Wikitech-l] Inspecting page performance with mw.loader.inspect()

2013-10-11 Thread Ori Livneh
On Fri, Oct 11, 2013 at 1:28 PM, Dan Andreescu dandree...@wikimedia.org wrote: I know close to nothing about this, but I'm kind of interested in finding out. Would it be possible to $('little language toothed wheel thing').on('click', load something like jquery.uls.data)? That would

Re: [Wikitech-l] Inspecting page performance with mw.loader.inspect()

2013-10-11 Thread Santhosh Thottingal
On Saturday, October 12, 2013, Dan Andreescu wrote: I know close to nothing about this, but I'm kind of interested in finding out. Would it be possible to $('little language toothed wheel thing').on('click', load something like jquery.uls.data)? That would already be 37.13KB. For the

[Wikitech-l] Inspecting page performance with mw.loader.inspect()

2013-10-10 Thread Ori Livneh
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

Re: [Wikitech-l] Inspecting page performance with mw.loader.inspect()

2013-10-10 Thread Eran Rosenthal
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