“Premature optimization is the root of all evil” is a (mis)quotation that anyone who has seriously studied development knows. Coined by Donald Knuth, it’s intended to convey the idea that some optimizations are better than others, and that wasting time on minor optimizations is an inefficient use of time that could be better spent elsewhere. I’m often struck by how much time some WordPress site owners spend working on minor performance optimizations to no great effect, while they ignore major performance optimizations like moving their site to faster hosting. There are many sources of optimization information online, and for the most part they provide advice that is good in theory, but that may mislead site owners into spending undue resources on optimizations that don’t give them the best bang for the buck.
Optimizing for performance is an important part of providing a great user experience. No one likes a slow site. For users, slow sites provide a frustrating experience. And for site owners, they can seriously degrade conversions and engagement — too slow and users will find alternatives or, at the very least, will interact with the site less than they would otherwise.
But site owners should be smart about what they optimize. In a recent blog article, Nate Berkopec discussed a huge performance improvement he’d been able to make on rubygems.org. By changing webfont provider, he slashed the loading time of pages on a crucial part of the Ruby development ecosystem. His optimization was well chosen and informed by hard data about which factors were impacting page load times.
Efficient performance optimization requires performance testing to guide site owners to the points in the loading process that have the most influence on load times. Focus on the areas that will have the greatest impact. Your browser’s developer tools and performance testing sites like WebPageTest and Pingdom Tools are your friends.
I’ll end with a word of warning — “premature optimization is the root of all evil” is sometimes used as an excuse to not optimize for performance at all, or to avoid optimization tasks that would have a substantial benefit but that would take a lot of work. My point here is not that WordPress site owners should ignore performance optimization, but that performance optimization efforts should be intelligently focused where they have the most benefit.