Introduction to Reactive Web Performance

Venkatesh Kamalapathy
2 min readMar 17, 2021

--

User contexts are crucial for measuring Performance. i.e., the device, the network type, connection strength, etc.

“A big city, it’s fast”

“It’s not my fault; on my high-end device in a big city, it’s fast” — a deprecated thought.

We develop the app, measure performance, apply optimization techniques & start all over again. Since performance is based on the user’s context, one should always collect user metrics.

What are all the user metrics that we can get?

  • DNS, TCP, HTTP request, and response
  • Type of connection (2G/3G/4G/5G/other)
  • Bandwidth latency (RTT)
  • Device’s memory
  • Custom metrics with some actions (Ex: adding to cart)
  • Paint timings (first paint)
  • CPU-intense operations

How can we collect user metrics?

Navigation Timing API

Navigation Timing API is available on all browsers. This is the API for web performance and it works on the client-side. It provides performance information to the server. It does that via a fetch request or by adding data to HTTP headers. Note: Not all browsers have all APIs.

Three main functionalities

  1. performance.now() — faster and more accurate than DateTime.now()

2. Navigation type — helps to get navigation-related information(ex: redirectCount)

3. Get timings for current navigation

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Venkatesh Kamalapathy
Venkatesh Kamalapathy

Written by Venkatesh Kamalapathy

A Polyglot Developer and a Competitive Programmer. Interested in web technologies, cloud computing and electronics.

No responses yet

Write a response