Menu

Measure web performance before you optimise
📰

Measure web performance before you optimise

DEV Community: frontend·Mohammad Khalifeh·13 days ago
#keCzUhED
#devtofrontend#devto#dev#measure#change
Long article (486 words) — no AI summary yet.
Reading 0:00
15s threshold

"The site feels slow" is not something you can fix. "The largest image on the home page takes 3.1 seconds to appear on a mid-range phone" is. Before changing any code for performance, I measure, find the biggest cost, fix that, and measure again.

What to measure

For websites, Google's Core Web Vitals are a good starting set because they describe what a visitor actually experiences:

Largest Contentful Paint (LCP) : when the main content appears. Aim for under 2.5 seconds.

Interaction to Next Paint (INP) : how quickly the page responds to taps and clicks. Aim for under 200 milliseconds.

Cumulative Layout Shift (CLS) : how much the layout jumps while loading. Aim for under 0.1.

For an API, measure latency percentiles (p50, p95, p99) per endpoint, not averages. One slow query hides easily in an average.

Lab data and field data

Lab data comes from a controlled run: Lighthouse, WebPageTest, or the Performance panel in Chrome DevTools.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.