2. Favorite Quotes from Velocity
• Don't optimize anything unless you measure it
– Patrick Meenan
• Don’t take performance advice. Test it – Jake
Archibald
• Embrace the pain. Become a performance
masochist – Tim Kadlec
5. If we were given a budget of 1000ms
on Mobile…
Let’s work backward and identify where we spend our time
Ilya Grigorik from Google
6. Input
latency
Hardware 55 - 120+
ms
Software
0 - 300
ms
3G (200 ms
4G(100 ms
RTT)
RTT)
Cell Network (200-2500
ms)
(50-100
ms)
DNS lookup
200 ms
100 ms
TCP Connection
200 ms
100 ms
TLS handshake (200-400
ms)
(100-200
ms)
40 KB HTTP 200 ms *
request
3
100 ms *
3
1055 4300 ms
555 1220 ms
These are the
latency you
will encounter
when
someone
clicks a URL
on phone
7. Critical Rendering
• Optimizing Critical Rendering Path
– Render critical path(html) on the server
– Inline Critical CSS in head
– Data URI’s (for images)
– Lazy Load Everything else
8. New API’s available in Latest
Implementation of Browsers
• window.performance.timing
• Page Visibility (document.hidden)
Its important to visualize what happens from customer standpoint. Its important to test. Network and Round trip time has a lot of impact on the performance of the website. Show Demo of how it peforms on Cloud drive Manage Page and files website.
Not all browsers support this. Safari does not support performance timingapinavigationStart, requestStart - https://developer.mozilla.org/en-US/docs/Navigation_timingrequestAnimationFrame - http://www.paulirish.com/2011/requestanimationframe-for-smart-animating/.Date.now – gives you time in milliseconds. Now its in sub milliseconds