Showing posts from 2013

Reducing Domain Sharding

This post originally appeared on the Perf Planet Performance Calendar on December 7th, 2013. Domain sharding has long been considered a best practice for pages with lots of images.  The number of domains that you should shard across depends on how many HTTP requests the page makes, how many connections the client makes to each domain, and the available bandwidth.  Since it can be challenging to change this dynamically (and can cause browser caching issues), people typically settle on a fixed number of shards - usually two.   An article published earlier this year by Chromium contributor William Chan outlined the risks of sharding across too many domains, and Etsy was called out as an example of a site that was doing this wrong.  To quote the article: “Etsy’s sharding causes so much congestion related spurious retransmissions that it _dramatically_ impacts page load time.”  At Etsy we're pretty open with our performance work, and we’re always happy to serve as an exampl

Pushupdate 2013

This is a follow-up to my " 1,000,000 Push-ups " post.  Check that out for the reasoning behind this challenge. November 19th was my birthday, and it also marked the end of the second year of my push-up challenge.  For the last year my goal was to average 100 push-ups per day, and I finished five push-ups ahead of that goal, with a running total of 54,805 push-ups.  This isn't a magical coincidence, there's a strong rubber banding effect with my color coded spreadsheet .  When I get behind, I do more push-ups to catch up.  When I get ahead, I know that I can take a day off if I get tired or lazy.  This kept me hovering right around my target throughout the year.   If you look at the " Year 2 " tab in the doc, you will see that there was a lot more yellow than in year one.  This is largely because I got sick at the end of April, and had two consecutive days with zero push-ups.  It took me quite a while to catch back up, because I didn't have any time p

A New Source For WPO Resources

** Update 12/03/13 ** - This article was deleted by Wikipedia moderators.  If you want the full background on why, check out the deletion talk page .  I have just moved the article to the Web Platform Wiki , which is a more appropriate place for it. After my last post with its abundance of footnotes, some people asked for a place on the web where they can see an aggregated list of performance resources.  This has been tried in the past , and I believe that it has failed because it has always relied on a single person or entity to update the list.  Ideally we would like to have something that fulfills the following goals: Hosted by a non-partial third party Anyone can update - no single point of failure An existing site that people trust, so we don't have to reinvent the wheel A site with a bright future - we don't want this to be obsolete in a few months This is starting to sound vaguely familiar... That's right, the new home (hopefully) for Web Performance

We Have a Long Way To Go

When you work on web performance every day, it is easy to assume that the best practices are widely known, widely understood, and widely followed.  Unfortunately, as I have learned through a couple of different experiences recently, this is not the case.  It is frankly astounding how many websites are still failing to implement the best practices that Steve Souders outlined in his book " High Performance Websites " over six years ago .  Six years is an eternity when it comes to web development, but I still regularly meet professional software engineers who are surprised when they hear about the rules that the WPO community evangelizes on a daily basis. First, The Data Let's try to scope the problem.  Using data from the HTTP Archive , we know that: Average PageSpeed score is still in the 70's Pages talk to 17 domains on average Only 44% of resources have proper caching headers 23% of resources are still uncompressed Via Radware we know that pages are

30 Day Challenge: Vegetarianism

For context about 30 day challenges, watch  this Ted Talk  by  Matt Cutts . My 30 day challenge in September was to be a vegetarian - and a true vegetarian, so no meat whatsoever, including seafood.  I've thought about doing this challenge for a while, and  this video pushed me over the edge.  My goals for this challenge were simple: See what it's like to live as a vegetarian, and what options are available Be more conscious about meat consumption in general See if this is something that I could sustain long-term I did pretty well throughout the month, and only slipped once.  During the first week of the challenge I was at my great-aunt's 100th birthday party, and it was at a restaurant with a fixed menu.  The only options were chicken, salmon, or steak.  The kitchen said that they could make me a plate of steamed vegetables, but I decided that I would make an exception and order the steak.  I don't feel like this means that I "failed" the challen

What I Learned From 30 Days Without TV

My 30 day challenge for August was to avoid watching any television or movies, and I finished about a week ago.  This challenge was tough, primarily since my girlfriend Stephanie (who I live with) was not under the same restriction.  As a result I ended up catching a few minutes of TV and movies here and there, but I did manage to avoid watching a complete show or movie for the entire month.  Also as a clarification, I exempted things like TED talks, screencasts, and other educational videos from this challenge.  The focus was really to avoid "junk food" entertainment that doesn't provide any lasting value. Surprises Two things surprised me about this challenge.  The first was how hard it was to go completely cold turkey.  In addition to the temptation at home, many of the bars and restaurants I went to in August (obviously) had TVs.  I also spent some time in airports, where TVs are never far away.  If you truly wanted to avoid even looking at a TV for a month it wo

Northeast PHP Recap

Last weekend was the 2nd annual Northeast PHP conference in Boston.  I gave two talks, " Practical Responsive Web Design " ( slides ) and " Scaling PHP to 40 Million Uniques " ( slides ).  I had a lot of fun at the conference, and met some great people.  I didn't get to attend as many talks as I would have liked, since I spent some of the sessions preparing for my own, but there were a couple that I really enjoyed:

30 Day Challenge: No TV or Movies

For context about 30 day challenges, watch this Ted Talk by  Matt Cutts . I'm trying an experiment for the month of August - not watching any television or movies.  I've never been someone who watches a ton of TV, but when I get into a show I can power through a ten episode season in a week.  Throughout July, I spent more time in front of the TV than usual, and some of my other activities have fallen by the wayside as a result.  I got to a point where I was in the middle of four books simultaneously, and working on three concurrent programming related side projects.  When you add that to everything else I have going on (Ultimate frisbee, Taekwondo, preparing talks for conferences, seeing friends, walking my dog, push-ups , work) it became unsustainable.  I would get a little overwhelmed by my schedule, and default to mindless activities to relax.

Cognitive Biases in Software Engineering

Human logic, unlike that of the machines which we program and use every day, isn't perfect.  We make mistakes, we establish bad mental habits, and we have many cognitive biases that negatively impact our ability to be successful engineers.  I want to go over five of the most common biases that I see on a regular basis as a software engineer.

Sleep Testing

One of the most important things you can do for your health, happiness, and productivity is to get enough sleep.  You have probably heard this so many times that it feels like white noise at this point, but what if you could actually do it?  What if you could wake up refreshed and energetic every day, and not struggle to get out of bed?  I believe this is achievable for everyone - as long as you are willing to take the time to methodically test your sleep schedule, and make a few minor changes to your bedtime routine.

14 Day Challenge - Information Diet

In the spirit of the 30-day challenges popularized by Matt Cutts (among others), I have spent the last 14 days on an "information diet".  This is not a new idea by any means, and in fact there was an entire  book written about the concept (and a more recent one from Cal Newport which I highly recommend).  I actually heard about it initially from Tim Ferris, and this post on the 4-Hour Life Blog.  Anyway, enough with the background - what the heck is this about?

Coursera Review: Intro to Computer Networks

I recently finished my first Coursera class, Introduction to Computer Networks .  This was a 10 week long class, and I spent approximately 3-4 hours per week on it.  If you are thinking of taking a Coursera class, and this one in particular, then read on...

A Comprehensive Guide to WebP

WebP (pronounced " weppy ") is an ambitious and promising new image format that was created by a team at Google back in September of 2010 , but browser adoption has been slow.  At the time of this writing the only major browsers that support WebP are Chrome and Opera, even though support in native applications is strong (albeit with plugins in many cases).  In this article I want to present an unbiased, holistic view of the WebP landscape as it stands today.  My end goal is to further the conversation about alternate image formats and image compression on the web, because I believe it is one of the biggest opportunities for making web browsing faster across all devices and networks.

How Much CSS Should You Have?

I've noticed recently that it's becoming more and more common to see websites with WAY too much CSS.   I realized that I've never seen specific guidelines around how much CSS a website should have, and no clear narrative around the impact of total CSS transfer size.  Most people just say " as little as possible " or " just write what you need and then optimize ".  On the whole I think these statements are a bit too vague to be useful.  In addition, there are a lot of articles about "optimizing" CSS (a.k.a  writing more efficient selectors), which has quickly diminishing returns.  In this article I will talk specifically about how big your CSS files should be, and talk about some other possible pitfalls when authoring CSS.