Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save aliesbelik/1407582e9913abde65d27c29136cd1ae to your computer and use it in GitHub Desktop.
Save aliesbelik/1407582e9913abde65d27c29136cd1ae to your computer and use it in GitHub Desktop.
Latency numbers every frontend developer should know

Latency numbers every frontend developer should know

Originally published by Malte Ubl at https://vercel.com/blog/latency-numbers-every-web-developer-should-know.

Metric Estimate Metric Impact Comments
Wifi latency to internet 1-4ms TTFB, FCP, LCP Wifi adds minimal latency to a connection. This can increase with a weak signal or older hardware.
5G high-band (millimeter wave) latency to internet 1-5ms TTFB, FCP, LCP Millimeter wave is the fastest deployed mobile technology. However, it is only practical to use in dense urban areas with a line of sight to the radio tower.
User-space budget per frame for 60 frames per second 5-10ms Smooth framerate On a 60fps device, a frame is painted every 16ms. However, the device needs some time for the actual processing of the frame. The time here is the time available for your code to compute what should be painted.
5G mid-band latency to internet 10-30ms TTFB, FCP, LCP This is the regular 5G latency. Experience may vary in case of bad signal or an overloaded tower.
Round trip latency to a service or database in same cloud region 10ms TTFB, FCP, LCP This is the latency to a different service that is deployed close to you without going to the internet.
LTE latency to internet 15-50ms TTFB, FCP, LCP Typical latency for LTE, aka 4G cellular networks.
Frame-duration at 60 frames per second 16ms Smooth framerate 60 frames per second is the most popular frame rate for display devices. However, some newer devices support higher frame rates like 90 or 120 fps.
FRound trip latency to other city on the same continent 33ms TTFB, FCP, LCP This is the latency you can expect if you deploy to a region on the same continent as your user. It's calculated for a distance of 5000 kilometers, so the actual latency may be slightly higher or lower.
Shortest duration of time perceived by humans as time having passed 40-80ms INP When responding to user input, staying below this duration means that your user will perceive the response as instant. (via)
Time to parse 1MB of CSS 100ms FCP, LCP Parsing CSS is part of the work the browser has to perform to render a web page.
Time to parse 1MB of HTML 120ms FCP, LCP Parsing HTML is part of the work the browser has to perform to render a web page. While it is often negligible for shorter web pages, it can become a major factor for very long articles.
3G latency to internet 150ms TTFB, FCP, LCP 3G is the slowest cellular standard in common use today.
Round trip latency to other side of earth with a high quality network (cold potato routing) 150ms TTFB, FCP, LCP This is the worst-case latency you should see if you deploy a service to a single region.
Time to parse 1MB of JS 150ms FCP, LCP, INP Parsing JavaScript can have a major impact on page load time as it often grows more quickly than CSS and JS. Code splitting is the primary technique to minimize JS size.
Duration of time perceived by humans as sluggish 200ms INP When reacting to user input, a response slower than this value will be perceived as having to wait. 200ms is also the threshold for "Needs improvement" in INP.
Round trip latency to other side of earth without leased fiber (hot potato routing) 300ms TTFB, FCP, LCP When users directly connect to a faraway server or when using a low-cost CDN, then latencies for users may double from passing bytes through the cheapest path possible.
TTFB Time To First Byte
FCP First Contentful Paint
LCP Largest Contentful Paint
INP Interaction to Next Paint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment