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

stick-to-finger fast 60fps websites / -apps - G...

Avatar for Kim Hogeling Kim Hogeling
November 06, 2015

stick-to-finger fast 60fps websites / -apps - GDG DevFest Hamburg 2015

My slides for the talk at GDG DevFest Hamburg 2015
http://devfest.de/
So our pages load fast now, PageSpeed Insights loves us and we tweeted #perfmatters with pride, but we're not done yet! If we miss our 60fps goal, interacting with websites and -apps can become pure pain - especially on mobile. In this talk I will first explain in short how browsers turn our code into pixels each frame. And with the help of Chrome's DevTools we will make scrolling and transitions jank free without giving up our eye candy features e.g. fixed header, off-canvas menu and parallax scrolling. Let’s create some fancy rich but silky smooth stick-to-finger user experiences!

Avatar for Kim Hogeling

Kim Hogeling

November 06, 2015
Tweet

More Decks by Kim Hogeling

Other Decks in Programming

Transcript

  1. @KimHogeling • Happy web developer • Work for shopping24 internet

    group in Hamburg • Crazy about performance (everywhere) • developer.s24.com • @shopping24
  2. @KimHogeling • Happy web developer • Work for shopping24 internet

    group in Hamburg • Crazy about performance (everywhere) • developer.s24.com • @shopping24
  3. @KimHogeling • Happy web developer • Work for shopping24 internet

    group in Hamburg • Crazy about performance (everywhere) • developer.s24.com • @shopping24
  4. @KimHogeling • Happy web developer • Work for shopping24 internet

    group in Hamburg • Crazy about performance (everywhere) • developer.s24.com • @shopping24
  5. @KimHogeling • Happy web developer • Work for shopping24 internet

    group in Hamburg • Crazy about performance (everywhere) • developer.s24.com • @shopping24
  6. @KimHogeling • Happy web developer • Work for shopping24 internet

    group in Hamburg • Crazy about performance (everywhere) • developer.s24.com • @shopping24
  7. GZIP, server-caching, browser-caching, CDN, SSL handshakes, TCP slow start, start

    render, speed index, doc ready, window load, amount requests, waterfall bottlenecks, prioritize content, critical render path, above the fold, lazy loading, compress images, uglify HTML/JS/CSS, garbage collection, pure functions, scopes, closures, remove unused CSS, prevent redirects, DB queries, DB indexes, persistent connection, reuse Curl for APIs, memcached, varnish, content proxy, refresh cron jobs, build tools, continuous integration, sitespeed. io, webpagetest.org, Google pagespeed insights, New Relic custom metrics, custom dashboards, app index, RUM vs synthetics, third party scripts, R CSSom, render tree mo What is performance?
  8. Event read / write style alter DOM Style Calculate Style

    - Find & apply CSS rules for matching selectors to each element Layout Paint Composite Pixel Pipeline
  9. DOM

  10. Event read / write style alter DOM Style Calculate Style

    - Find & apply CSS rules for matching selectors to each element Layout Paint Composite Pixel Pipeline
  11. Event read / write style alter DOM Style Calculate Style

    - Find & apply CSS rules for matching selectors to each element Layout Calculate used space and position of each element Paint Composite Pixel Pipeline
  12. Event read / write style alter DOM Style Calculate Style

    - Find & apply CSS rules for matching selectors to each element Layout Calculate used space and position of each element “Doc, this is heavy!” Paint Composite Pixel Pipeline
  13. Event read / write style alter DOM Style Calculate Style

    - Find & apply CSS rules for matching selectors to each element Layout Calculate used space and position of each element “Doc, this is heavy!” Paint Draw pixels onto multiple layers for everything visual e.g. text, images, borders Composite Pixel Pipeline
  14. Event read / write style alter DOM Style Calculate Style

    - Find & apply CSS rules for matching selectors to each element Layout Calculate used space and position of each element “Doc, this is heavy!” Paint Draw pixels onto multiple layers for everything visual e.g. text, images, borders Composite Sort the layers into correct order and place them in position Pixel Pipeline
  15. Hasslerics Looking for freedom One morning in June some twenty

    years ago I was born a rich man's son. I had everything that money could buy, but freedom I had none ☰
  16. Hasslerics Looking for freedom One morning in June some twenty

    years ago I was born a rich man's son. I had everything that money could buy, but freedom I had none ☰
  17. Hasslerics Looking for freedom One morning in June some twenty

    years ago I was born a rich man's son. I had everything that money could buy, but freedom I had none Looking for freedom One morning in June some twenty years ago I was born a rich man's son. I had everything that money could buy, but freedom I had none ☰
  18. Hasslerics Looking for freedom One morning in June some twenty

    years ago I was born a rich man's son. I had everything that money could buy, but freedom I had none ☰ Hasslerics ☰ Looking for freedom One morning in June some twenty years ago I was born a rich man's son. I had everything that money could buy, but freedom I had none
  19. Hasslerics Looking for freedom One morning in June some twenty

    years ago I was born a rich man's son. I had everything that money could buy, but freedom I had none ☰ Hasslerics ☰ Looking for freedom One morning in June some twenty years ago I was born a rich man's son. I had everything that money could buy, but freedom I had none
  20. Event Style Layout Paint Composite Pixel Pipeline width, height, margin,

    padding, left, top, border, clear, cursor, display, font-size, ... background-*, box- shadow, color, clip, opacity (default), text- shadow, z-index, ... transform, opacity (only at update), perspective.
  21. Event Style Layout Paint Composite Pixel Pipeline width, height, margin,

    padding, left, top, border, clear, cursor, display, font-size, ... background-*, box- shadow, color, clip, opacity (default), text- shadow, z-index, ... transform, opacity (only at update), perspective. dot!
  22. “Let’s Write Fast JavaScript A few interesting JavaScript benchmarks and

    tips” By Mahdi Dibaiee medium.com/the-javascript-collection/lets- write-fast-javascript-2b03c5575d9e