Google Page Speed Insights updated

Google Page Speed Insights updated

by David Scotson -
Number of replies: 4
Thought I'd mention that one of my favourite front-end tools has received an update:

http://developers.google.com/speed/pagespeed/insights/

Send it to your site and it'll tell you about what's making your site slow and how to fix it, and the list is in priority order so you know where to start.

Great for themes (e.g. picks up if you've forgotten to fully compress your images), but also good for testing your Moodle installation (e.g. it'll check if you've got gzip turned on).

PS I just created this exact post, word for word in the Themes forum, so if you want to talk about using this tool to make your Theme faster, you might want to go there instead:

https://moodle.org/mod/forum/discuss.php?d=233668
Average of ratings: -
In reply to David Scotson

Re: Google Page Speed Insights updated

by Ryan Smith -

We've been using this tool for a while to speed up some of our custom code. This tool does indicate several things that the Moodle developers should do to increase performance:

The following image(s) are missing width and/or height attributes.

http://www.myaddress.com/moodle/theme/image.php/standard/core/1375416055/moodlelogo (Dimensions: 100 x 30)
http://www.myaddress.com/moodle/theme/image.php/standard/core/1375416055/t/dock_to_block
http://www.myaddress.com/moodle/theme/image.php/standard/core/1375416055/t/switch_minus
http://www.myaddress.com/moodle/theme/image.php/standard/core/1375416055/t/switch_plus

 

The following publicly cacheable, compressible resources should have a "Vary: Accept-Encoding" header:

http://www.myaddress.com/moodle/theme/image.php/standard/core/1375416055/t/block_to_dock
http://www.myaddress.com/moodle/theme/image.php/standard/core/1375416055/t/dock_to_block
http://www.myaddress.com/moodle/theme/image.php/standard/core/1375416055/t/switch_minus
http://www.myaddress.com/moodle/theme/image.php/standard/core/1375416055/t/switch_plus

 

Optimizing the following images could reduce their size by 503B (25% reduction).

Losslessly compressing http://www.myaddress.com/moodle/pluginfile.php/672/user/icon/standard/f2?rev=1 could save 503B (25% reduction). (These are the default user image files in Moodle. They aren't optimized).

Average of ratings: Useful (1)
In reply to Sam Mudle

Re: Google Page Speed Insights updated

by David Scotson -
In my 2.4 site the javascript "head" file (and the "footer" one, though it doesn't block renderering as much since it's at the bottom of the page) are actually empty. I filed a bug, number MDL-35230 which claims to be fixed, so you shouldn't have an empty file anymore. If you follow that link and actually see javascript, then you might want to consider moving it to the footer javascript (and if it's empty then perhaps that bug isn't as fixed as it claims).

Some of the things you can do to make the theme CSS smaller, and therefore faster is to for example, manually delete RTL rules if you're not using them, delete Moodle modules you're not using (since Moodle will stick the CSS in anyway), run the CSS through a reformatter to make it more compressible. There are various bugs filed about these issues too, mostly linked from MDL-39094

If you're handy then some of them can be done manually to trim down the CSS size.