Who does not know the problem that always comes back with this particular situation: you develop a website (new one or existing one, it doesn’t really matter), you try to combine, connect complex business logic with and easy-to-use user-friendly interface. The issues here are as always the timelines and high quality expectations. Unfortunately after delivery it turns out that something is not playing perfectly in that orchestra.
Of course first thing that most of us will think of is the backend solutions. Trying to improve java code, optimize database queries, setup scalable solutions etc. Of course that is one way of getting things done in this department. However my simple-minded friend once said to me that such solutions are like stirring the soup by turning the pot around the spoon, that is being hold still, so basically not very efficient and rather time-consuming.
Unfortunately we all know what time-consuming will mean in the end: missing deadlines and necessity of re-doing the cost estimation that will collapse due to the mentioned lag. Of course these are not the only flaws that may occur. We cannot forget about the customer dissatisfaction concerning the delay in delivery, this can ruin your relationship with the buyers.
What can you do?
First thing that comes to mind is checking the backend. That is normal and nothing bad. There’s the complex business logic, the database as a typical bottle-neck, etc. People tend to make their life more and more complicated, so they seek solution of the problems in the most complicated part of their creations and thus frontend seems to be out of focus for them. But does it make sense? It was proved many years ago that the simplest solutions are in many cases the best one, like in the case of Gordian knot which was solved by a simple cut. Why not use this way with this problem too?
Use tools such as YSlow which tests your web pages “based on a set of rules for high performance web pages”. YSlow is available as plugin for Firefox, Chrome, Safari and Opera making it really easy to use. YSlow provides a quick overview where the time got lost and what you can do to improve the performance. With this data you can easily find the very root of your problems. This way it is easier to act on the real source of the problem and not just “stir the pot around the spoon”.
Picture 1. Grade before optimization in YSlow.
Picture 2. Grade after optimization in YSlow.
Picture 3. Statistics before optimization.
Picture 4. Statistics after optimization.
The best thing is that many improvements require just a small implementation effort, in many cases it can be done via Apache Webserver configuration!
- Gzip Components - use and configure mod_deflate in your Apache Server
- Add an Expires or a Cache - Control Header - use mod_expires
We recommend you some further readings concerning this topic and encourage you to ask us questions as well, we are always open for an interesting discussion:
- cdw-blog posted this