DEV Community

Discussion on: I'm Addy Osmani, Ask Me Anything!

Collapse
 
andy profile image
Andy Zhao (he/him)

What are the first performance improvements that you look for when going to a web page?

Collapse
 
addyosmani profile image
Addy Osmani

The first performance improvement that I check for is whether the site can be shipping less JavaScript while still providing most of their value to the end user. If you're sending down multiple megabytes of JS, that might be completely fine if your target audience are primarily on desktop, but if they're on mobile this can often dwarf the costs of other resources because it can take longer to process.

In general, I try to go through the following list and check off if the site could be doing better on one or more of them:

✂️ Send less JavaScript (code-splitting)
😴 Lazy-load non-critical resources
🗜 Compress diligently! (GZip, Brotli)
📦 Cache effectively (HTTP, Service Workers)
⚡️ Minify & optimize everything
🗼 Preresolve DNS for critical origins
💨 Preload critical resources
📲 Respect data plans
🌊 Stream HTML responses
📡 Make fewer HTTP requests
📰 Have a Web Font loading strategy
🛣 Route-based chunking
📒 Library sharding
📱 PRPL pattern
🌴 Tree-shaking (Webpack, RollUp)
🍽 Serve modern browsers ES2015 (babel-preset-env)
🏋️‍♀️ Scope hoisting (Webpack)
🔧 Don’t ship DEV code to PROD

Collapse
 
andy profile image
Andy Zhao (he/him)

Phew, extensive list! Love the emojis :)

Collapse
 
rhymes profile image
rhymes

Great checklist! Thanks!

Collapse
 
superkarolis profile image
Karolis Ramanauskas • Edited

Could you clarifiy what you mean by library sharding? Awesome list by the way, thank you!

Collapse
 
iamsunny profile image
Sunny Sharma • Edited

Thank you Addy for sharing the checklist, enough points for my next talk :-)