fieldData to confirm real-user INP, and use scorePlan + bootup-time + long-tasks to eliminate the main-thread JavaScript blocking interactions.
INP Thresholds and the Lab Proxy (TBT)
Because Lighthouse runs an automated page load without human clicks, INP is field-only (reported in fieldData from CrUX). In the lab, Total Blocking Time (TBT) is the direct proxy—and TBT carries 30% of your Lighthouse performance score.
| Metric | Where Measured | Good | Needs Improvement | Poor |
|---|
fieldData (28-day real users) | ≤ 200 ms | 200–500 ms | > 500 ms |
| TBT (Lab proxy, 30% weight) | Lighthouse lab scorePlan | ≤ 200 ms (mobile) | 200–600 ms | > 600 ms |
If your fieldData shows INP > 200 ms, fixing lab TBT and heavy event handlers is what moves both your Lighthouse score and real-user responsiveness.
Step 1: Export a Stripped AIReport (or Call MCP)
Run your slow URL on Mobile at speedexporter.com and click Download AIReport (JSON)—or let Claude Code, Cursor, or Windsurf call analyze_url via our MCP server.
Inside the <50KB AIReport, check four fields:
fieldData.url/fieldData.origin: Confirms real-userINTERACTION_TO_NEXT_PAINTp75 latency.scorePlan.strategies[].metrics: Showstotal-blocking-time'snumericValue,pointsAtRisk, andtargetFor90(200 ms on mobile, 150 ms on desktop).issues[]affecting TBT: Look forbootup-time,mainthread-work-breakdown,long-tasks,unused-javascript, andthird-party-summary.details.items&fixLocation: Names the exact script URL, sourcemodules, and whether the culprit is first-partycodeorthird-party(thirdParty: true,entity).
Step 2: Prompt Your AI Agent to Break Up Long Tasks
Attach the AIReport to Claude, ChatGPT, or Cursor with this prompt:
The attached JSON is a stripped PageSpeed Exporter AIReport for [URL].
Our real-user INP is failing (> 200 ms).
1. Check fieldData for INP and scorePlan for total-blocking-time (numericValue, pointsAtRisk, targetFor90).
2. List the top culprit scripts from bootup-time, long-tasks, and mainthread-work-breakdown.
3. Separate first-party code (fixLocation: "code" or "build-config") from thirdParty entities.
4. For each first-party culprit, give me exact code diffs to:
- Yield to the main thread inside heavy event handlers (scheduler.yield() or setTimeout fallback)
- Code-split or defer non-critical hydration/bundles
- Avoid forced synchronous layouts (read DOM measurements before writing styles)
5. For third-party scripts, show how to defer or load them after interaction instead of editing remote files.
The 4 Code Fixes That Move INP the Most
1. Yield to the Main Thread in Heavy Handlers
Any synchronous task over 50 ms blocks the browser from painting the next frame after a click or keypress. Yield back to the browser before heavy work:
async function yieldToMain(): Promise<void> {
if ('scheduler' in globalThis && 'yield' in (globalThis as { scheduler?: { yield?: () => Promise<void> } }).scheduler!) {
return (globalThis as { scheduler: { yield: () => Promise<void> } }).scheduler.yield();
}
return new Promise((resolve) => setTimeout(resolve, 0));
}
export async function handleFilterChange(items: Product[], query: string) {
// 1. Update lightweight UI state immediately so the browser paints feedback
setInputValue(query);
await yieldToMain();
// 2. Run the expensive filtering/sorting in the next task
setFiltered(expensiveFilter(items, query));
}
2. Defer Third-Party Widgets (Chat, Analytics, Tag Managers)
If bootup-time flags thirdParty: true entities (Intercom, HubSpot, GTM, review widgets), defer them until after hydration or user interaction. In Next.js, use next/script with strategy="lazyOnload" or afterInteractive; in plain HTML, load non-critical scripts with defer or on first interaction.
3. Shrink Hydration & Unused JavaScript
Large client bundles cause hydration long tasks that block early clicks. Move static UI to Server Components (in Next.js), lazy-load modals/charts with dynamic() or React.lazy(), and remove unused modules flagged in details.items[].modules.
4. Eliminate Layout Thrashing Inside Click Handlers
Reading offsetHeight or getBoundingClientRect() immediately after mutating styles forces synchronous layout recalculation inside the interaction frame. Batch DOM reads first, then apply CSS class or transform writes.
Step 3: Re-scan and Verify
Deploy your patch and re-scan the same mobile URL in PageSpeed Exporter:
- Lab gate:
total-blocking-time.numericValue≤ 200 ms (mobile) and ≤ 150 ms (desktop on Starter/Pro). - Culprit check: The offending script's
scriptingduration inbootup-timedrops sharply or disappears fromlong-tasks. - Field tracking: Remember
fieldDataINP will not change on the same day—check CrUX and Google Search Console over the next 2–4 weeks as real user sessions refresh.
Further Reading
- What is Interaction to Next Paint (INP)? — full glossary definition and thresholds
- What is Total Blocking Time (TBT)? — how TBT proxies INP in Lighthouse
- How to Fix Total Blocking Time with AI — step-by-step
bootup-timeloop - Lighthouse MCP Server for AI Coding Agents — run live audits from Claude Code or Cursor
- Plans & Pricing — Free (5/mo), Starter (\$9/mo), Pro (\$29/mo)