liveBook · Manning

Latency

As explained in JavaScript in Depth

Latency is the elapsed time between a request or operation being initiated and its completion or observable response.

A Node.js server can run smoothly, then suddenly take hundreds of milliseconds longer to respond—even when database latency, network conditions, and task scheduling appear normal. A garbage-collection pause can stop the application during an HTTP response; allocating more objects gives the collector more work to do. section 9.0

Latency is elapsed time between an operation and its response. When response times spike, check whether garbage collection or event-loop scheduling is responsible rather than assuming the network or database is slow. section 9.0 section 11.0

How JavaScript in Depth covers it

How deep it goes
Connects latency spikes to garbage-collection pauses, but does not quantify latency or detail a measurement procedure.
Examples
Uses a React server-rendering application with intermittent response spikes and a customer dashboard showing high latency.
What you can do after
Diagnose response-time spikes by considering garbage-collection pauses alongside event-loop scheduling.
How it connects
Relates latency to garbage collection, event-loop lag, memory leaks, and performance diagnostics.

Also explained in

Compare how 12 books explain latency →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of JavaScript in Depth. The section links point to the parts of the book it draws on.