8. Addy Osmani (@addyosmani): Performance Engineering & Modern Web Architecture
Core Web Vitals masterclass from Addy Osmani: Eliminating main-thread long tasks with scheduler.yield(), conquering INP, and zero-millisecond navigations via Speculation Rules.

8. Addy Osmani (@addyosmani): Performance Engineering & Modern Web Architecture
"Fast websites don't happen by accident. They are the result of conscious architectural choices, continuous measurement, and relentless minimization of main-thread execution time."
— Addy Osmani, Engineering Director at Google Chrome & Author
💡 The Core Thesis
As author of Learning JavaScript Design Patterns and leading figure behind Google Chrome's Web Performance team, Addy Osmani represents the definitive voice on Core Web Vitals, browser runtime internals, and software engineering discipline.
In 2026, web performance is no longer just about Initial Page Load (LCP); it is dominated by Interaction to Next Paint (INP)—ensuring that every tap, click, and keystroke receives instantaneous visual feedback without main-thread jank caused by heavy JavaScript hydration or client-side rerenders.
🛠️ Key Architectural Patterns
1. Conquering INP with scheduler.yield()
Long tasks (tasks exceeding 50ms) block the browser's main thread from rendering user interactions. Instead of freezing the screen during heavy calculations, Osmani advocates breaking work using native scheduler.yield():
// Modern task chunking with native scheduler.yield() or fallback
async function yieldToMain() {
if ('scheduler' in window && 'yield' in (window as any).scheduler) {
return await (window as any).scheduler.yield();
}
return new Promise((resolve) => setTimeout(resolve, 0));
}
export async function processLargeDataset(items: any[]) {
const batchSize = 100;
for (let i = 0; i < items.length; i += batchSize) {
const batch = items.slice(i, i + batchSize);
processBatch(batch);
// Yield control back to browser so click/typing events can paint immediately
await yieldToMain();
}
}2. Speculation Rules API for Instant Navigations
Rather than waiting for the user to click a link, the modern web uses Chrome's native Speculation Rules API to prerender probable future pages in an invisible background sandboxed tab:
<script type="speculationrules">
{
"prerender": [
{
"source": "list",
"urls": ["/blog", "/resume"],
"eagerness": "moderate"
}
]
}
</script>When the user clicks the link, page transition latency drops to 0ms (instantaneous paint).
🧵 Ready-to-Post Tweet Thread
1/4 ⚡ Why @addyosmani is the ultimate guide to web performance:
If your site feels sluggish, your problem probably isn't network bandwidth—it's main-thread blocking. Interaction to Next Paint (INP) is now the primary Core Web Vital.
2/4 The fix for long task lag: scheduler.yield()
Stop letting heavy JavaScript loops freeze user typing or clicks. By yielding to the main thread in 50ms chunks, you keep input responsiveness at a crisp 60fps.
3/4 Prerender with Speculation Rules:
Chrome's native Speculation Rules API lets you safely prerender probable next pages in background sandboxes. When the user taps the link, navigation happens in zero milliseconds.
4/4 Follow @addyosmani for world-class architectural wisdom, engineering design patterns, and performance deep dives.📌 How to Follow & Stay Current
- X Handle: @addyosmani
- Key Themes: Web Performance, Core Web Vitals, INP, Design Patterns, Chrome Architecture.
- Top Hashtags:
#WebPerf#JavaScript#Chrome#WebDev
Discussion (0)
Continue Reading
More production-grade engineering deep dives and architectural guides

The Gemini Decisions API: Architecting a Deterministic Decision Service on a Probabilistic Model
A Hacker News thread argued about whether an LLM belongs on the critical path of a business decision. This is the production reference architecture that settles the argument: schema-bound structured output, bounded tool loops, deterministic policy gates, and a latency budget you can defend in a design review.

Brotli vs. Zstandard vs. Gzip at 1 PB/Month: Measured Ratios, CPU Seconds per GB, and the Real CDN Bill
At petabyte scale, compression is no longer a config flag — it is a P&L line item. Here are the measured ratios, real CPU-seconds-per-GB numbers, and the break-even cache-hit math that decides whether Brotli q11 pays for itself or quietly bankrupts your origin.

Micro-Frontends at 5,000 Routes: Module Federation vs single-spa vs Web Components, Measured
We rebuilt the same 5,000-route enterprise shell three times — Module Federation 2.0, single-spa, and native Web Components — and measured p95 route transitions, marginal memory per mounted remote, duplicated vendor bytes, and the fully loaded cost of 1M deployments. The results invert most vendor claims: the fastest architecture on cold start is the one that duplicates the most code.