As mentioned earlier, this site was meant to be and is a testing ground for me to test out various methods and experiment generally with different aspects of everything.
One
this I was and am adamant about is the speed of the site and so I
started to look for every trick in the book and tried to implement it.
From the joomla forums I found WSO
and gave my site a quick look. My results showed about 79 Http requests
and a loading time of 16.94seconds on a T1 connection! So I knew I had
work to do.
The following is what I did to speed up my site.
First the easily done methods.
1) Turn off Components, Modules and Mambots you don’t use;
This point I cannot stress enough, though it may just save you a few split seconds, it is a good practice to do.
2) Turn on caching in joomla;
If you go to Site>global configuration you will find an option to enable ‘caching’
3) Optimize and repair SQL Database;
As
you know (or don’t I didn’t when I started) everything on joomla is
done my queries to a central database and this may slow things down.
One
way to do the above is to go into Mysql and do it manually or set a
cronjob but in my need for an easier way I found the following
component SM2 db Health Check. This extension automatically repairs and optimises the database.
4) Use Page Cache;
this is an extra component by IRCmaxell which works well with the inbuilt joomla caching and can be found here.
5) Compress images;
According
to WSO the bulk of what was being loaded was images. So what I did next
then was grab all the images I was using and compress them using Irfanview and re-uploaded them; this shaved about 2 seconds of my time.
With
these done I saw a decrease in loading time but according to WSO things
were still not good so I tried some more tricks, these require you to
have mod_gzip enabled on you server and the ability to add/ edit your
.htaccess file, which should be in your ‘root’.
6) Enable Gzip;
In my travels I a came across this beautiful article on .htaccess tricks
and was determined to give some of them a go.In my case it was slightly
different to as described by perishable; all I did was add the
following ot my .htaccess file:
‘php_flag zlib.output_compression on’.
But wait you can compress some more! On the same site I discovered how to compress both CSS and JavaScript
This gave me the greatest speed boost from all the tweaks but remember this is a cost to some cpu power for compression.
This section requires tweaking your .css .js and .html files always save a copy before applying these tweaks.
7) Cut out images you don’t need;
Again
here I used WSO to identify all images and then once identified I went
through my .css files and deleted reference to this.
Clean up and optimise .css and .js files;
I firstly deleted all the ‘white space’ in the files. I then ran all the .css through an optimiser and all the javascripts through a separate optimiser this shaved about a second off my time.
9) Validate .css and html;
if there are errors the browser has to guess and what to do, and regardless there is a slight lag so use W3 to validate and fix both .css and .html files.
Now
my site has only 15 http request and loads in 3.30 seconds on a T1
connection. Yet my need is still great so what else can I do to improve?
10) Combining .css and .js;
This I am still working on but mpettitt gives a good quick idea how to do it here.
11) Upgrade to Joomla 1.5,
Ircmaxells latest test shows that there is a great improvement between 1.0 and 1.5 though the caching seems a bit odd overall it is better and faster.
12) SQL caching;
This
can be a great boost but requires a great deal of ram; in addition to
this ircmaxwell has also released a query cache component to his site
that you must check out if serious about this.
13) PHP accelerators;
Accelerators such as APC, Zend and xcache can provide a great boost also.
14) Use Lighttpd;
Ircmaxell’s other latest benchmarks test Shows that this is a lot more efficient by an average of 94% in dishing out you site.