Web Performance 101

David Novicki

Why?!

Why WE care

  • Our app is growing in size everyday
  • Large data sources served via client-side
  • A user's flow of thoughts change > 1s
  • Performance can impact our consultants the ability to deliver their service

What are some metrics we care about?

Goals

  • Speed Index < 1-2.5s
  • First meaningful paint 1-3s
  • First interactive 2-4s

How do we measure?

General Improvements

  • HTTP/2 -> HTTP/3
  • Client-side Caching
  • CSS trimming
  • Code Splitting
  • DNS-prefetch
  • No images in CSS

Extreme Optimizations

  • ATF in 14.6 KiB
  • Avoid HTTP to HTTPS redirects (hstspreload.org)
  • zopfli/brotli > gzip ~25% data transfer savings
  • Readable Streams
  • Cache-control: immutable
  • Stale while Revalidate
  • Font-display: optional or swap
  • Long Task tracking
  • Avoid unnecessary repaints

Web Performance 101

By David Novicki

Web Performance 101

  • 164