Performance Enhancements

So this whole site is based on WordPress (duh) and I’ve been on it now for a year and a half or so. I miss LiveJournal in some ways but overall, I’m quite happy to have my own blog on my own domain. The one thing that has been a real pain for me though since I moved here has been dealing with WordPress from a performance standpoint. Its a very heavy PHP application and it’s varied anywhere from slower than molasses in the winter to sluglike. If you’re not logged in, then the speed is better since I have caching set up but once you’re logged in, forget about it. And with the photo gallery I’ve been adding the last few weeks, that was also pretty slow.

I’ve been running the server itself on a VPS rather than a shared instance which is a decent step up but things were still so slow! I did some profiling and discovered each hit was producing about 60 – 70 database queries. Querying the database is one of the most expensive things you can do! So I added some database caching and that dropped down to about 20 calls and a very noticeable speed bump. But the WordPress core was still taking over 2 seconds to load!

Since I got so much improvement just from decreasing the database calls, I decided to test moving all of my databases to a VPS as well. Low and behold! That cut the load time to about .5 seconds. I was avoiding that because it increased the cost of running my blog but if saving money means I don’t like using it because its so slow then the money I was spending was a waste anyway. So I’m quite happy with how the site is working now!

Leave a Reply

Your email address will not be published. Required fields are marked *