Huge speed improvements to Campaign Monitor

Now that A/B Testing is well and truly released, we'll be rolling out a stack of other cool updates we've been working on of late. If you've logged into your account in the last couple of days you might have noticed everything feels snappier. Judging by some of the reactions we've been seeing, plenty of you have already spotted the difference.

{title}

Given the fact that a big percentage of our customers are web designers and developers themselves, I figured we'd share some of the more juicy details on the changes we've made to improve the overall performance of Campaign Monitor. Many of these changes are things you can apply to your own web sites to improve page load times. Before we get into the nitty gritty however, let's take a peek at the results.

{title}

The chart above is based on the data provided by one of our layers of performance monitoring. This particular tool actually simulates a real user by walking through and performing many common tasks in Campaign Monitor on a regular basis. The time on the left hand side refers to the number of seconds it took to complete the sequence of tasks.

As you can see, the combination of updates we made resulted in a 35-40% speed improvement across the application. Here's what we did.

Switching JavaScript libraries

For the last few years, we've been big fans of the Protoype and script.aculo.us JavaScript libraries. Any part of the Campaign Monitor interface that moves, flashes or updates without a page relies heavily on these libraries.

As part of this update, we switched the entire application over to jQuery. We made the switch for a number of reasons, including the growing community and plugin support, but the primary motivator for us was file size. Switching to jQuery shed around 150kb compared to the previous combination. Your clients using our email builder will notice a huge speed boost when creating their next campaign.

Big props have to go out to our designer Dave Martin for the smooth transition to jQuery. The rewrite was a huge job and everything went beautifully.

Improved caching and speed for static content

By getting smarter about how we cache the static parts of the application like CSS files, scripts, images and even our charting SWF files we were able to dramatically reduce the number of requests your browser makes moving around your account. Instead of requesting a copy of these assets for each page load, your browser now knows to load the cached version from your local machine and avoid any server requests.

On top of this, we're also serving these static assets from the same super-fast CDN we serve your campaign content from. This means that instead of having to serve your files from our main US data centre, each asset will be served from the closest of our 15 key locations around the world.

Campaign Monitor CDN locations

Because of the two request limit per subdomain, we've also spread all assets over multiple subdomains to ensure the maximum number of files can be requested and downloaded simultaneously by your browser. This basically lets us quadruple the speed you can download pages in the app.

Consolidating our JavaScript files

We've combined multiple JavaScript files into a single file to reduce the number of server requests when you load that page.

Where possible, we've also moved the JavaScript to the bottom of the page to ensure you can start using that page before it has fully downloaded. This also means we can reduce the impact of browser limitations imposed when downloading a JavaScript file. Basically, browsers block other requests when downloading JavaScript files because that file could have an impact on the display of the page being downloaded. By moving any files that don't impact the design of the page to the bottom, we avoid any unnecessary delays.

Last but not least, we've also minified our CSS to get the file size as small as possible.

Of course, these changes are only one piece of the performance tuning pie. As well as improving the client-side experience of Campaign Monitor, we're also working hard on database indexes plus query and code optimization on the server side. I hope you enjoy these updates. If you've noticed the changes or have any feedback at all, we'd love to hear about it.

Posted in:

11 Comments

  1. Maby you can also use the tool from Google to see where you can make even more speed performance.

    http://code.google.com/speed/page-speed/

  2. Did you guys change the way custom domains work? The whole interface is different from what I remember, and one of the DNS settings isn’t required anymore?

  3. Campaign Monitor team member

    Bjorn, thanks for the tip. We did use YSlow for Firebug a lot during our testing, and it came in very handy.

    George, there weren’t any custom domain changes made that I’m aware of. Just to clarify, are you talking about custom domains, or sending domain authentication (e.g. DomainKeys and SPF).

  4. Great work guys. Speeding along nicely now… jQuery rocks.

  5. And of course “big props” also to John Resig for jQuery. That guy should be super-rich by now for what he’s done for website development but I suppose all he’s got is that nice warm feeling that his code is powering a huge number of sites around the world.

  6. Campaign Monitor team member

    Good call Dean, we certainly wouldn’t have seen an improvement like this without all of John’s hard work.

  7. Great work.  I just finished doing similar things to a client’s site, although on a much smaller scale.  :)

    “The chart above is based on the data provided by one of our layers of performance monitoring.”

    Do you mind revealing the name of this tool?  If not, no worries.

  8. Campaign Monitor team member

    Sure Ryan, we use Dotcom-Monitor for this kind of monitoring.

  9. If you have to do it, you might as well do it right.,

  10. I want to say - thank you for this!,

  11. Fantastic!

Comments for this entry are closed.

Explore the Email Gallery