Skip to content

Performance

A practical performance budget checklist

January 22, 202610 min readRasel Hossain
Performance

Quick answer

A performance budget sets hard limits: under 170KB of JavaScript per route, images in AVIF or WebP with explicit dimensions, fonts with display swap, and third-party scripts deferred past interactivity. Targets are LCP under 2.5 seconds, INP under 200 milliseconds and CLS under 0.1 on mid-range mobile.

Performance is a feature you have to protect. I keep a checklist that takes about 30 minutes to run and catches 90 percent of regressions. It has saved three launches I can name — a storefront whose hero video added four seconds to mobile LCP, a dashboard shipping two chart libraries for one chart, and a marketing site loading five font weights for two used. Every one was caught by the same routine below.

Set a budget before you optimize

A budget turns vague concern into enforceable numbers. Mine for typical marketing and SaaS pages: under 170KB of compressed JavaScript per route, under 1MB total page weight on mobile, zero render-blocking requests beyond the critical CSS and fonts, and Core Web Vitals passing on a mid-range Android device over 4G — not just desktop Chrome.

Enforce it in CI where possible. Bundle analyzers and Lighthouse budgets fail the build when a dependency pushes a route over limit, which forces the conversation at pull-request time instead of after launch. Manual discipline fades; automated gates do not.

Images, fonts and media first

Images are the biggest lever on most pages. Serve AVIF with WebP fallback, size images to their display slots instead of uploading 4000-pixel originals, set explicit width and height to prevent layout shift, and lazy-load everything below the fold. One e-commerce audit cut 2.1MB to 380KB from these steps alone.

Fonts come second. Use display swap so text never stays invisible, subset to the languages you serve, and ship at most two weights per family. Every additional weight is a render-blocking download on first visit. For video, never autoplay a multi-megabyte file as a hero — use a poster image with click-to-play, which is what finally fixed that four-second storefront LCP.

  1. Audit the largest image on each template — convert to AVIF/WebP, resize to display size, add dimensions
  2. Subset fonts, keep two weights, verify display swap and preconnect to the font host
  3. Lazy-load below-the-fold media and defer offscreen iframes
  4. Replace hero video autoplay with poster plus click-to-play
  5. Defer third-party scripts past interactivity and remove tags nobody owns

JavaScript and third parties

Audit every kilobyte of client JavaScript by asking what breaks without it. Marketing pages have shipped with A/B testing, chat widgets, session replay and four analytics tools simultaneously — each one taxing INP long after load. Keep one analytics path, lazy-load chat and replay on interaction, and code-split route-level dependencies so the homepage never pays for the dashboard charts.

Third-party scripts deserve a named owner and a removal date. My rule: any tag without an owner gets removed in the next sprint. Consent-mode analytics that fires only after a choice also keeps the initial load honest, which pairs well with a clear cookie notice.

Measure like your users browse

Always measure with real device profiles — a mid-range Android on throttled 4G, not your development laptop. Track LCP under 2.5 seconds, INP under 200 milliseconds and CLS under 0.1 as the passing bar, and record the numbers per template so regressions show up as deltas instead of vibes.

Reviewing the checklist every sprint keeps performance discussions concrete and prevents the slow creep that makes sites feel heavy a year later. Run it alongside the technical SEO audit before every launch — the two overlap heavily on images, scripts and crawl efficiency — and treat any regression as a bug, not a tradeoff, until proven otherwise.

Written by

Rasel Hossain — author photo

Rasel Hossain

Full Stack Developer & AI Automation Engineer — 6+ years, 168 projects delivered on Fiverr, SaaS platforms and automation in production.

Published:

#Performance#Web Vitals#Core Web Vitals#Optimization

How to do it

  1. 1

    Set numeric budgets

    Fix JS, page-weight and Web Vitals targets per template and enforce them in CI.

  2. 2

    Fix media

    Convert images to AVIF/WebP with dimensions, subset fonts, and replace hero autoplay with click-to-play.

  3. 3

    Control scripts

    Keep one analytics path, lazy-load chat and replay, and remove ownerless third-party tags.

  4. 4

    Measure on mobile

    Test mid-range Android over 4G and track LCP, INP and CLS per template over time.

Frequently asked questions

What is a good JavaScript budget per page?

Under 170KB compressed per route for content and marketing pages; dashboards with real interactivity can justify more but should still code-split per route. Anything above 300KB on a landing page almost always contains something removable.

Why does my site pass on desktop but fail on mobile?

Desktop tests hide slow CPUs, smaller caches and throttled networks. Always test with a mid-range mobile profile — that is where most users and all Core Web Vitals field data come from.

What is the single biggest performance win?

Optimizing the largest image or removing hero autoplay video. On content sites this single fix often moves LCP by seconds — more than all JavaScript tuning combined.

How often should I run the checklist?

Fully before every launch and lightly every sprint: bundle size, largest image, new third parties and field Web Vitals. Creep is gradual, so cadence matters more than intensity.

More articles

Related reading from the same areas — practical notes on shipping software.

View all articles

Liked the article?

Have a similar problem in your business? Let's talk about building the fix.

Start a project