a companion discussion area for blog.codinghorror.com

Performance is a Feature


We've always put a heavy emphasis on performance at Stack Overflow and Stack Exchange. Not just because we're performance wonks (guilty!), but because we think speed is a competitive advantage. There's plenty of experimental data proving that the slower your website loads and displays, the less people will use it.

This is a companion discussion topic for the original blog entry at: http://www.codinghorror.com/blog/2011/06/performance-is-a-feature.html


Unicorn Dollars!


It’d be nice if Amazon Cloudfront was a little faster. But it’s certainly not bad. The real win is the price for the little guy. There’s no monthly fee since pricing is purely based on usage. And for the little images I’m hosting through their service, it’s costing me about $0.10/month.


As a corollary, I switched to Google Chrome because it runs so much faster than any other browser that I’ve used. Speed matters!


Using a CDN is incredibly easy - much more so than some of the other tips.

NetDNA have a very cheap and easy to use solution for smaller sites called MaxCDN. It’s around $40 for a year or 1000GB whichever happens first (various discounts around).

This allows two types of CDN to be setup:

pull (i.e. you just give your site a new name (e.g. images-origin.damieng.com) and make MaxCDN the old name (images.damieng.com) and tell it what you named your origin and it does all the magic.

push - this basically acts as an FTP/SFTP server you upload files to directly. It’s best used for larger downloads where the time it would take the CDN to get it from your site would be a negative impact.



Very interesting post by the way. Looks like you guys made some truly remarkable improvements.

I’ve always been obsessed with performance since my OpenGL programming days. And so naturally I’ve spent a lot of time optimizing my sites as well. Your advice is spot on.

Oh, and I actually downloaded the MVC mini profiler the other day, and I’m planning on using it next week. I’m looking forward to it.


Minor nitpick: opportunity cost doesn’t mean what you think it means. Opportunity cost is the value of the forgone alternative, so if you say that opportunity cost for switching websites on the internet is zero, that implies that the value of websites is zero.



Wow Jeff - I really am not setting out to troll, but seriously… does your wife read the blog? I am not sure the exact, technical, stackoverflow.com accepted factual definition of “Trophy Wife” - but seriously, publicly stating that you are still waiting for that (and a jet)… not cool dude. OK - maybe waiting for the Jet is cool.

My prediction: Jeff has to pay up, hire a babysitter and spend a relaxing vacation in Bermuda with his now publicly recognized “Better than a Trophy Wife” before the year has ended. Just please hold back on the pasty programmer pictures. Think of the children.


Pitty fogbugz doesnt learn from this. Using in australia it is just too slow.

If so, what are you doing reading this instead of flying your private jet to a Bermuda vacation with your trophy wife?

Performance is a feature. Making assumptions about the sex of your readers is just a bug.


Does it make any difference if the site loads 100ms slower? Can a normal human being notice that difference?


Jeff, let me tell you that I’m once again surprised about the fact that pretty much everything you put on your blog inspires me and raises my thirst for improving myself and the work I’m doing. Thank you very much.


@Meenakshi: Absolutely any normal human can notice a 100ms lag. Would you watch a television that displayed only ten frames per second?


Jeff, despite your love for speedy web sites, I don’t like it that my web site’s PageSpeed score being hampered by the fact that I’m using StackOverflow’s flair. The flair, being an image, was not compressed enough and its expiration duration too short (1 day. PageSpeed suggested 1 week).



You browse the internet for both work and school, and site average being about 1/2 second slower then they need to be because of crappy programming, and negligence.

How many sites do you go to a day? 20, 50, 100? lets take the 50 number.

50 X .5 = 25 seconds. A day.

25 x 7 = 175 a week.

175/60 = ~ 3 minutes give or take.

3 * 12 = 36 minutes a year.

Again, is it the end of the world? No. But why should the web be a bloated piece of crap when local applications are almost instant?

Jeff is right, the web can be much better. If you have a decently fast computer, and chrome, you can SEE when the server side is horribly unoptimized and bloated. Its obvious, and users do appreciate it. Why, because the problem is MAGNIFIED if the user machine is NOT fast. If they are on a work terminal with a single core p4 and a gig of ram, in winxp, and your site doesnt even load on my 3 ghz dual core with 4 gb ram, what do you think is gonna happen if they have client side rendering lag? It ADDITIVE. Web developers need to understand how important this is. Its beyond just niche power user stuff here, its a HUGE market share of people without the latest and greatest hardware, that think your site sucks.

Fix it.


The MVC Mini Profiler looks awesome. Too bad I’m using WebForms. :confused:


Looking at that MVC-Mini-Profiler. It seems like it is designed for you to have Database logic living in your web application. I have all of my database logic in a separate service running on other machine… Does the Mini-Profiler handle that scenario? If not, I’m a little shocked to learn that some of the large scale web applications that use it don’t have their database logic running in a separate service.


also… @DThink

I think you’re missing the point here. Does it make a difference to the USER that the site is 100ms slower? Hell NO. It doesn’t… at all. You could lose the same amount of time by not drinking your coffee and reacting slower to the page coming up. It’s negligible FOR THE USER…

The REAL point is this: 100ms of time means it was probably processing ~100ms longer. Using CPU, memory and other resources during that time. Processor time is finite on a machine (or even multiple machines)… So the longer a page takes to process, the fewer requests you can handle over a specified time period.


I am with Mark here. I use Fogbugz and Kiln both are ridiculously slow. Jeff, tell Joel to fix his slow software.


Are you guys really running SO/SE on Asp.net MVC? Since your mini-profiler is written for Asp.net MVC I have to assume so. That just blows my mind as most asp websites / web applications I’ve used are terrible.

Can you please let me know why you chose to use Asp.net? I’ve been somewhat anti-Microsoft in my software choices for a while (desktop support for ~6 years will do that) and I’m curious to what features it offers that make it worth it. For the record I use PHP.