Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Making It Better Without Making It Over (Front ...

Making It Better Without Making It Over (Front Porch)

Rebecca Murphey

October 25, 2016
Tweet

More Decks by Rebecca Murphey

Other Decks in Technology

Transcript

  1. Making It Better 
 Without Making It Over Rebecca Murphey

    @rmurphey Front Porch Dallas / October 2016
  2. 0 5000 10000 15000 20000 2008 2009 2010 2011 2012

    2013 2014 2015 2016 2016.8 JS Lines of Code
  3. It’s easy to feel 
 like the only way 


    to make things better 
 is to start over.
  4. Easy Math T = time S = payload size W

    = bandwidth (bytes/s) S = 78K W = 1500K/s T = S / W = 52ms
  5. Latency T = time S = payload size W =

    bandwidth (bytes/s) P = one-way transmission time (ping) S = 78K W = 1500K/s P = 75ms T = (2 * P) + S / W = 202ms
  6. TCP Setup T = time S = payload size W

    = bandwidth (bytes/s) P = one-way transmission time (ping) RTT = round-trip time (2 * P) S = 78K W = 1500K/s P = 75ms RTT = 2 * P = 150ms T = (2 * RTT) + S / W = 352ms
  7. But TCP slow start … A server starts by sending

    only a few packets of data, increasing the “congestion window” as packets are acknowledged.
  8. TCP Setup T = time S = payload size W

    = bandwidth (bytes/s) P = one-way transmission time (ping) RTT = round-trip time (2 * P) C = congestion window (bytes) R = number of round trips S = 78K W = 1500K/s P = 75ms C = 14.6K RTT = 2 * P = 150ms R = ceil( log_2( (S / C) + 1) ) = 3 T = ( RTT * (1 + R) ) + S / W = 652ms - excludes DNS lookup for initial request to a host - assumes instantaneous server response, no packet loss, 
 and lots of other things
  9. Easy Math T = time S = payload size W

    = bandwidth (bytes/s) S = 78K W = 1500K/s T = S / W = 52ms
  10. Reality T = time S = payload size W =

    bandwidth (bytes/s) P = one-way transmission time (ping) RTT = round-trip time (2 * P) C = congestion window (bytes) R = number of round trips S = 78K W = 1500K/s P = 75ms C = 15K RTT = 2 * P = 150ms R = ceil( log_2( (S / C) + 1) ) = 3 T = ( RTT * (1 + R) ) + S / W = 652ms - excludes DNS lookup for initial request to a host - assumes instantaneous server response
  11. 1K T = time S = payload size W =

    bandwidth (bytes/s) P = one-way transmission time (ping) RTT = round-trip time (2 * P) C = congestion window (bytes) R = number of round trips 1K file size 75ms ping 15K congestion window 1500K/s bandwidth RTT = 150 R = 1 T = ( 150 * (1 + R) ) + 1 = 301ms
  12. which workflows matter most? where are the bytes coming from?

    how can we hold the line after improving?
  13. Framework or no, 
 JS growth & complexity 
 is

    unbounded 
 without constraints.
  14. It’s unrealistic for you […] 
 to learn a framework

    
 that solves a problem 
 you’ve never experienced. 
 Tessa Thornton,
 How to Learn Web Frameworks https://medium.com/shopify-ux/how-to-learn-web-frameworks-9d447cb71e68