If you like this presentation – show it...
Your WebPerf is ! Holger Bartel | @foobartel | HK CodeConf 23/10/2015
42 requests, 6.3 MB
250 requests, 6.7 MB
86 requests, 10.2 MB
Performance is a thing.
Expectations Users expect ~2-3 seconds to load a site…
Expectations Users expect ~2-3 seconds to load a site… That’s the deﬁnition of ‘fast’ We’re even aiming to deliver something in even less
Expectations 50% of people say they'll abandon a page that takes longer than 4 seconds to load
Faster is Be er!
The Real World (and why you should care)
40% of surveyed online shoppers will abandon a page that takes more than 3 seconds to load. — Akamai (2009)
Speeding up a fundraising site by 60% increased donations by 14%. — Kyle Rush, Obama Campaign (2012)
Adding half a second to a search results page can decrease traﬃc and ad revenues by 20 percent — Google
Every additional 100 milliseconds of load time decreased sales by 1 percent. — Amazon
Images - The Big Evil (and an easy ﬁx)
Original 2 MB @ 298 x 530 ImageOptim App Optimised 73 KB
01 Oct 2012 - 15 Oct 2014 http://httparchive.org/interesting.php
01 Oct 2014 - 01 Oct 2015 http://httparchive.org/interesting.php
Performance is Design
Performance is Design Design is Performance
Performance is Design Design is Performance Design directs Performance
“Performance is a compromise between design and performance. You can only be as fast as the design allows.” — Ian Feather
Breaking Silos Collaboration & communication between designers and developers nowadays is essential and more important than ever before.
Get designs into the browser as soon as possible, so you, your team and your client can get a be er feel for what it will be like in the real world.
If your website is 15MB it’s not HTML5, it’s stupid. — Christian Heilmann
Ask yourself: What's the gain? What do you want to achieve?
A carousel with 7 images is it really worth the load time or just pre y to look at?
Whereas it's questionable if images 3-7 will be seen in the ﬁrst place.
Building for Performance
Render-Tree Construction, Layout & Paint Waiting for DOM and CSSOM to build the render tree. Render tree contains nodes to render the page. Layout computes the exact position and size. Paint turns the render tree into pixels on screen.
Render Blocking CSS Wait for CSS Avoids “Flash of Unstyled Content” (FOUC)
Loading Assets Every request fetched inside of HEAD, will postpone the rendering of the page
Limit HTTP Requests Every request takes roughly ~200ms Avoid unnecessary redirects
Critical Rendering Path Critical Resource Critical Path Length Critical Bytes
Optimising the Critical Rendering Path = Ge ing ! on the screen fast
To get our li le friend ! on the screen fast…
Minimise the number of critical resources. Minimise the number of critical bytes. Minimise the critical path length. A critical resource is a resource that can block initial rendering of a page.
Analyse and characterise: number of resources, bytes, length. Minimise number of critical resources. Optimise order of remaining critical resources being loaded: download critical assets as early as possible. Optimise the number of critical bytes to reduce the download time (number of roundtrips).
Performance Testing http://www.webpagetest.org
Performance Testing http://tools.pingdom.com/fpt/ https://developers.google.com/speed/pagespeed/ https://developer.yahoo.com/yslow/
Chrome Dev Tools
Perf-Tooling Today http://perf-tooling.today
Perf Rocks http://perf.rocks
Perf School github.com/bevacqua/perfschool
With achieving fast page load time, people can quickly use your site and accomplish what they want.
People will appreciate it and end up being happier users.
Happier users mean be er conversion rates. Be er conversion rates can be increased revenue, more signups, returning visits, or downloads.
So… Let’s make the web less !
Thanks! Holger Bartel | @foobartel | HK CodeConf 23/10/2015