Author Topic: mod_pagespeed: First findings  (Read 10631 times)

Torben

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 305
    • View Profile
mod_pagespeed: First findings
« on: November 11, 2010, 10:06:57 PM »
Mod_pagespeed is still in beta and many people have reported nasty bugs so for now mod_pagespeed is only for experimental use.
I have tested it on a test server and I’m not impressed. It does give you better load times but it is not an optimal approach to the load time problem.

Conclusion: Mod_pagespeed is a symptomatic treatment for the lazy webmaster.


We use WordPress for most of our sites and I always use W3 Total Cache and mod_pagespeed doesn’t do anything that W3TC can’t do.

Some say that mod_pagespeed is better because it is a binary Apache module but nothing could be further from the truth. Yes, it is a binary module but it is a symptomatic treatment to a problem that should be handled at the application level. mod_pagespeed optimizes the pages in real time and caches them, but it does not help generate the pages any faster. W3TC caches database queries and PHP data objects, which makes WP generate the pages faster.

When it comes to minifying, page caching and compressing files W3TC wins again because it gives you much more granular control over minify and caching policies. Furthermore it saves the optimized and compressed file on disk or in memory so all Apache has to do is serve the file to the client browser. How ever you look at it, it is always faster for Apache to serve a preprocessed static compressed file than it is to process html output with mod_pagespeed.

I don’t want to go in to detail but there are plenty more cool functionalities in W3TC that you won’t get with mod_pagespeed like 3rd party CSS or JavaScript optimization, preloading pages to cache,  integration with CDN just to name a few.

Optimal performance starts at the application level and all the issues you can fix with mod_pagespeed should ideally newer be an issue to begin with if you do things the “right” way.

So what about a site that does not run on WordPress or any other platform with built in caching and optimization? Suppose you have built your own template system and caching haven’t been a high priority. In this case you may gain a lot from mod_pagespeed (when it becomes stable). However, because mod_pagespeed doesn’t have granular controls of the optimization you may have to build your site to be compatible with mod_pagespeed.

The problems you may run in to are:
-   Not all JavaScript, css, html can be minified
-   Some .js files depend on inline JavaScript which means that you may not be able to combine the scripts in one file.

In other words it is something you have to test on a per site basis, so it is not a fire and forget solution. Having said that I would definitely test it and use it if it is compatible with you site because it does give you better load times.


jangro

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
    • Email
Re: mod_pagespeed: First findings
« Reply #1 on: November 11, 2010, 11:16:15 PM »
Excellent, thanks dude.

We do use W3TC on wordpress blogs, but as you noted we've got lots of websites that are home-grown platform solutions.

We already have built in Amazon S3 support for images with Cloudfront CDN as well as disk caching and memcache for content and query caching.
We use minify on JS and sprites for small images.

We still have performance issues primarily because of all the heavy lifting the pages are doing to generate content and we're slinging a lot of jquery, but also surely because we can even better optimize images and get more static content pushed out to the CDN (css, javascript, some images)

Bottom line, it doesn't sound like mod_pagespeed is going to be a silver bullet.

Thanks for the analysis.

bill

  • Devil's Avocado
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1286
  • Avast!
    • View Profile
    • Email
Re: mod_pagespeed: First findings
« Reply #2 on: November 12, 2010, 08:01:01 AM »
Thanks for the analysis on that Torben. I think I'll hold off on playing with this one for the time being. You've saved me a ton of time.

PaulH

  • Guest
Re: mod_pagespeed: First findings
« Reply #3 on: November 12, 2010, 08:18:27 AM »
Thanks Torben!

On the subject of minifying JS, on one site we switched to the minified JS version and suddenly started getting a lot more complaints about things not working. We tested and tested and eventually found Norton antivirus was wrongly detecting a trojan and killing our JS.   ???