High Perfomancea guide for optimizing the performance
of Joomla! websites
by Fotis Evangelou (JoomlaWorks)
www.joomlaworks.gr
Joomla!Days Netherlands - 12 & 13 June 2009
www.joomlaworks.gr
What's covered in this session
• Basic principles of web content delivery
• Prepare Joomla! for prime time
• Optimize our template and our content
• Configure hosting
Basic principles of web content delivery
www.joomlaworks.gr
The closer the server is to the user, the better- DNS lookups (avoid redirects)- The concept of the CDN (Content Delivery Network)
Browsers use 2 HTTP connections per domain to download content- Increase website download time using subdomains/CDN- Combine CSS files- Combine Javascript files- Combine layout images into sprites
All modern browsers accept compressed content sent from the server- Compress HTML, CSS and Javascript code
Prepare Joomla! for prime time
www.joomlaworks.gr
Prepare the tools for your work- Install Firefox with Firebug, YSlow and Web Developer Toolbar
Global Configuration- Enable Joomla!'s built-in cache mechanism- Enable GZIP
Extensions- Choose extensions that properly separate content from layout/behaviour – disable their CSS/JS includes and call CSS/JS code into your template where possible.- Enable caching for modules
Optimize our template and our content
www.joomlaworks.gr
- Combine and compress - using Gzip - CSS/JS files
- Do not pack your JS code, feel free to minify
- Use one JS library/framework
- Initiate JS code into as little onload events as possible
- Put all your layout (non-content) images as background images in
your template's CSS file
- Combine all your layout non-repeating images into one big image
(sprite), use CSS positioning to display
Optimize our template and our content
www.joomlaworks.gr
- Resize/resample content images manually or use a plugin to do
that
- Understand when to use GIF, PNG or JPEG
- Enable debug in Joomla!, check the number of queries with
cache on and off. Identify slow queries in PHP code.
- Dynamically replace URLs to point to subdomains/CDN
(make site.com/images/ show up as images.site.com)
Configure hosting
www.joomlaworks.gr
- Optimize MySQL depending on your needs and taget audience
- Use a CDN for image, CSS, JS and other static content delivery
- Split website load into 2 servers (if possible): one acts as web
server, the other as database server
Case study: gazzetta.gr
www.joomlaworks.gr
Thank you
www.joomlaworks.gr