Wednesday, May 19, 2010

Optimizing WordPress Performance: KuwaitPaperDump Gets a Boost

Updated on May 20th: Benchmark results!

The awesome guys at KuwaitPaperDump (KPD) have been doing a great effort into reducing paper usage and providing almost all kinds of brochures and leaflets online.

For such great efforts, I felt obliged to help them gain even the tiniest performance boost possible. And they did!

WordPress introduced a set of options since 2.6 that would help take advantage of some features of the HTTP protocol: A protocol that all websites and browsers speak and communicate with.

Currently, KPD have taken one of several steps into boosting the performance. The next steps require some coding and some ritual dancing. Hopefully we'll get those done and invite everyone for the paperless party soon ;D

I've already created a presentation for KPD to simplify the concept and ideas, so rather than rewriting, I'll link to that presentation and just summarize things in here for reference.

Optimization tricks:
  • Load files in parallel
  • Separate the static content from the dynamic one
  • Enable GZIP on the server, not WordPress
  • Serve files from a geographically closer location
The last point is possible to achieve  with mirroring the content between 2 servers and create a failover scenario using free Dynamic DNS services.

You may want to check back here in a week or two, because we'll try to benchmark before and after each enhancement to know how much performance gain we're getting.

  • Before using a subdomain to point at same server: 16 seconds to full page load
  • After (on Mac): 10.6 seconds (33.75% performance boost)
  • After (on Linux): 8.9 seconds (55.6% performance boost)
There will be more benchmarks as PaperDump goes for extra enhancements, so stay tuned!

The presentation can be found here. (browser and mobile friendly!)

No comments: