You know, I had some idea this site could be a little, well, slow at times. I figured it was a combination of a shared hosting service and a few extraneous widgets in the sidebar. But with clients’ projects needing attention, and the Social Signal site needing some love, well, it’s always the home front that gets neglected, isn’t it?

Still, I’d had no idea just how bad it was until Evan Leeson sent me a wake-up call, telling me the site just plain wasn’t loading for him. So, in the departure lounge at YVR at 5:10 this morning, I tried to load the site.

“Wow,” I thought. “Crappy wi-fi they have here, huh?”

Except other sites were loading just fine. Mine, though, was taking forever.

Okay: my flight didn’t leave until 6:00. I could take a few minutes to give robcottingham.ca a little TLC.

I started by taking out a few of the more bandwidth-challenged widgets. (Sorry, Amnesty International!) That seemed to improve things a little… but the site was still barely trickling in.

Finally, a message in my browser’s status bar caught my eye. The holdup, it seemed, was because of a single script that my site was importing from a third-party site. One… little… script.

You know what that script does? It makes sure that, when you click in a form field, the background colour of that form field faaa-aa-ades from blue to yellow. That’s it.

For this, I was making you wait for endless hours? (You did hang around for the endless hours, right?)

That poor, overloaded server that housed the remote version was simply never responding – although in fairness, the author, Adam Michela, had encouraged people to link to it.

So I replaced the script with a local copy and whoosh, the site roared in.

Until the end of the first post. That’s when it stalled again – this time, on another third-party script, this one from the fine folks at FeedBurner. It’s called a FeedFlare, and it automatically adds a bunch of links for sharing blog posts with other people.

And it was taking about 20 seconds to load after every single post on the page.

Buh-bye. I’ll figure out a way to return some similar function to the site soon – but in the meantime, it’s gone.

With that, I thinned out the sidebar some more, took out the large ugly gradients (they were so 2005), cleaned up this and that, and…

…well, you tell me. Does it seem zippier to you?


Lessons learned:

  • See if you can figure out where a page is stalling. Odds are good it’s on something you’re pulling from another server.
  • If you can, host files locally. If you can’t, ask yourself if that script or widget is worth whatever performance hit it’s imposing on your users.
  • Less is more.
Mastodon