Don't Neglect Front End Optimization :: BLOGWe're in Turkey right now for our annual meeting, and I just received a customer request for MySQL optimization. I almost always do a little background research before responding to such requests. One of the first things I do is load the customer's website. In this case I watched Firefox's status bar, and noticed the following behavior on this slow network:
This is a great example of the need for optimizing more than just the backend. I don't know yet, but I feel pretty sure that the site's backend was indeed very slow to reply, possibly because of a long-running query in MySQL. But even after that happened, my web browser did a lot of work downloading the site, and I was forced to sit and stare at white pixels. There was no incremental rendering or anything else to keep me on the site. This stage of the page load literally took over a minute. This can be due to many different types of problems. Most of them are quite basic mistakes and are easy to solve. However, even though they are simple, they are also very widespread. This goes right to your bottom line: there's no way an average user, who unlike me is not determined to wait it out, will stay on the site. If you're making money from online commerce, that's a lost sale. If you're making money from ads, those are impressions that aren't delivered. Speaking of ads, sites that put ads (or tracking pixels) inline often impact the site experience very negatively, and this doesn't have to be the case, either. When done wrong, a simple tracking pixel can bring the entire page load to a halt while there's a DNS resolution, connection to a third party site, downloading, and rendering. On a slow network, this can effectively freeze the browser for five seconds or more. And "clever techniques" to avoid it, such as using JavaScript, often just make this worse, not better. This is exactly why Percona now offers frontend optimization as a formal service. Many of us have deep expertise in the area; before joining Percona, for example, some of us built award-winning e-commerce websites that are among the top shopping destinations on the Internet. Don't think your problems begin and end at query optimization or Apache tuning. Changes on your frontend can dramatically improve the site's performance, too. The difference between a site that takes a few seconds to render in the user's browser, and one that renders in the blink of an eye, is often not consciously noticed, but research proves that users enjoy themselves more and are much more likely to stay and return when "the site is fast." |
|
|
|
|