Slow Running Websites
When using any website one of the worse things to run into is a site responding slowly. It makes you feel like your not doing anything, like your wasting your time, and that the site is “boring”. It doesn’t matter rather your being paid to use the site or not. Even employees getting paid hourly don’t want to use a company site to do things if the site is slow. There are a few things you can do however to speed things up a bit. This article is aimed at both developers and clients, and as such it will provide only a high level look at things, that hopefully everyone can understand.
First Define slow
The most annoying thing to hear is “the site is going slow.” That may be the case, but thats not a help to anything. The first step it to define what slow is, and what it means. Is it slow to load, slow to animate, slow to render, etc. Once you have determined what you mean be slow, then you can move forward.
Slow to load
This can be seen visually, remember the good ol’ days of 14.4kbps modems. Loading a site with a few images on it could take minuets, but you could also see those images loading. Slow to load sites will look the same. To fix this, you need to reduce the overall size of the data being transmitted and reduce the number of things being transmitted.
First start with images (it’s the easiest). If you have 5 images all un-edited and taken with a 10 Megapixel camera, thats going to be a lot of data. If you can reduce the picture sizes before uploading them, that can make a huge difference. The goal here is to reduce file size.
Slow to Render
When I say slow to render I mean slow for the server to render. This can best been seen as pages that are “waiting on server” for long periods of time. There are several things you can do to address these issues. First ask yourself, does this really need to be this dynamic. If your doing 100 data base queries to populate content that never changes, then making that content static could be a major speed boost.
Your server may also have resource issues. When you request a page, if your server resources are near 100% then it’s going to take a long time for the server to render that page. You should try using the 80/20 rule when sizing your hardware (80% of the time your server should be below 20% of capacity. The other 20% is should never climb above 80%).
Another reason a site may be slow to render is complex code. Calendars, image manipulation, and data transformations are all examples of tasks that, no matter how well the code is written, is just going to take a long time. To help with that you can try pre-rendering the content, caching the content, or redesigning to reduce complexity. If your site is a calendar app, and the month view is taking to long to load you could always try a two week view. If your just having issues with complex tasks caching should do the trick.
Lastly, you may have render issues due to just plain ol’ bad code. The only way to fix that is to get better code written.
Slow to Animate
Other ways websites can be slow
There are some other ways sites can be slow. I just want to take a few seconds to acknowledge them. The most difficult to correct is overly complicated markup. Markup should strive to be as simple as it can be. HTML is very powerful but when made too complex for it’s own good, browsers can usually take far too long to render it. I have seen examples of pages using 50 megs of markup or more to render simple tables. To fix this usually requires an entire rewrite.
There are also client side slowness issues. This can best be identified by the site running well for everyone except one or two people. To fix this, those people may need to upgrade their browser, get faster internet, or remove some browser add-ons. Often times with this type of slowness there is nothing to do server side.
Perceived slowness is another problem. This is harder to spot, but when a webpage takes a second or so to be usable it doesn’t matter that it rendered and transferred in 100ms. In this case it’s almost always over use of animations and page transitions that cause this problem. Try keeping your animations to highlighting things and not blocking user interaction.
Coteyr.net Programming LLC. is about one thing. Getting your project done the way you like it. Using Agile development and management techniques, we are able to get even the most complex projects done in a short time frame and on a modest budget.
Feel free to contact me via any of the methods below. My normal hours are 10am to 10pm Eastern Standard Time. In case of emergency I am available 24/7.
Phone: (813) 421-4338