Experiments in making this site quicker - Part One
I've been reading into issues regarding website speed and the impact it has over the last week and so I decided to try and make things a little quicker around here. In the first part, I look at making Expression Engine zip along a bit quicker...
We need to get a benchmark
To be able to see where the site was in speed terms, I needed to run a few benchmark tests. To do this, I enabled “Display Output Profiler” in the Expression Engine control panel (Admin - System Administration - Output and Debugging). This dumps a whole host of information on to every page of the website when a super user (yes, I am indeed a “super” user) is logged in. Things displayed are processing time, number of queries and configuration variables - amongst a LOT of other stuff.
If you run an Expression Engine site, try it.
Before doing anything
Home Page -
- Controller Execution Time: 0.4404ms
- Total Execution Time: 0.5171ms
- 39 queries called
Post Page - (similar on all post pages)
- Controller Execution Time: 0.5713ms
- Total Execution Time: 0.6753ms
- 73 queries called
So, given this site doesn’t actually “do” much (it is after all, a simple blog site), these numbers aren’t that scary.
What did I change?
The answer here is not a lot.
I enabled SQL Query Caching - (in the Control Panel: Admin - System Administration - Database Settings) and I enabled Cache Dynamic Channel Query Caching (in the Control Panel: Admin - Channel Administration - Global Preferences). That’s it. I ticked two boxes.
Results?
Home Page -
- Controller Execution Time: 0.2387ms (a 50%ish reduction)
- Total Execution Time: 0.2587ms (a 50%ish reduction)
- 30 queries called (reduction of 9 queries)
Post Page -
- Controller Execution Time: 0.3053ms (a 50%ish reduction)
- Total Execution Time: 0.3288ms (a 50%ish reduction)
- 51 queries called (reduction of 22 queries)
I’m pretty pleased with that - that means two boxes has saved you some waiting time. Why wouldn’t you want to tick those two boxes? I’m pretty certain I can go further with Expression Engine tweaks but to be honest, given the volume of traffic to this site, and it’s lack of functionality, it’s hardly worth it.
However, I’m going to look at optimising my HTML, CSS and images next - that’ll be part two.