Airbnb Perf Notes:

@samccone 9/13/2016


airbnb does some really cool stuff to get the page to render really fast, however the site then does a bunch of uncool stuff mitigating the entire gains of SSR (server side rendering)

I like to think I summarized my feeling quite well here ;)

So let's go ahead and look at the two main bad actors on the page and see what we can do to make the world happy again!

Why the page feels so slow even though it looks like it is done:

When I try and interact once you show me something

Nexus 5x while trying to scroll after initial load

View trace / download trace 

Well we are downloading a whole bunch of code and the main thread is totally stuck evaluating JS.... Do we really need all of this code? How much is actually being run?

I made a thing to answer this!

Link to the coverage results:

Turns out we are running well under 40% of the code that we ship to the user, more like 25%.

So this one is really easy -- ship less code, be faster!

Why does nothing respond on my phone when I touch?:

The Airbnb website on my mobile phone is a painful experience. On my nexus 5x it takes on wifi over 10 seconds for the page to actually respond to my touches.

You can see many attempts to scroll, but the browser didn't ship a frame at all for >7 seconds

Nexus 5x on wifi results:

View trace / download trace

9s js lockout

Browserify js pattern --- chrome devtools makes you think that the real cost is here, however when you drop down into chrome://tracing and do a recording you can see that most of your time is actually spent parsing the javascript!

var e = function(e) {

        function t(r) {

            if (n[r])

                return n[r].exports;

            var a = n[r] = {

                exports: {},

                id: r,

                loaded: !1


            return e[r].call(a.exports, a, a.exports, t),

            a.loaded = !0,



        var n = {};

        return t.m = e,

        t.c = n,

        t.p = "",


    }([function(e, t, n) {

        e.exports = n(1514)

    }, …..])

Read more about optimization tricks here: