Optimized for Speed
News travels fast. This has always been the rule, even when fast was “on horseback.”
Now, fast is measured in milliseconds.
To keep up with our recent traffic increase, I’ve been taking steps to make the site continue to load as fast as possible. Yahoo has developed a firefox extension called YSlow. It analyzes all of the traffic from a website and gives a score on a few categories where improvements can be made.
I decided to start with making the style sheets and javascript files load faster since they are an easy target for optimization. The framework that we use for IvyLees is django and a few people have created an application that we can plug in to help us compress some files.
After setting up django-compress, a website will have css and js files that are minified (excess white space and characters are removed to reduce file size). The application will also give the files version numbers so that they can be cached by the web browser and won’t need to be downloaded again until a change is made and a new version of the file is created.
For the site, this means faster general usage. For news releases, it means they’ll load even faster– but every one after the first will be even faster than that.
We’ve also upgraded and installed some things on the server to increase performance. I’ve written about the technical details of setting up nginx, memcached, and using gzip compression over at Code Spatter, so take a look over there more tech-heavy info.