Why does streaming (SSE) improve perceived latency without changing total decode time?
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
Total decode time is identical with or without streaming. Why does Server-Sent Events (SSE) streaming dramatically improve the user-perceived latency of an LLM application?
Streaming pushes each token as it is generated, so the user sees content at time-to-first-token instead of waiting for the whole reply. Total decode time is unchanged; only the perceived wait shrinks.
Imagine asking a friend a long question. One friend stays silent, works out the entire answer in their head, and recites all of it at once after a long pause. Another friend starts talking the moment the first words come to mind and keeps going. Both take the same total time to finish, but the second feels far more responsive, because you stop waiting almost immediately. Streaming makes the model behave like that second friend. The server sends each word the instant it is ready instead of holding everything back. You start reading right away, and the rest flows in as it is produced. The actual work the model does is identical either way.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
3 min: total time identical + perceived latency as time-to-first-visible-content + TTFT numbers + SSE versus WebSockets versus chunked transfer + connection-hold cost and batching.
| Aspect | Non-streaming | SSE streaming |
|---|---|---|
| First visible content | After full decode (~20 s) | At TTFT (~hundreds of ms) |
| Total decode time | Same | Same |
| Transport | Single HTTP response body | Long-lived HTTP event stream |
| Connection cost | Closes quickly | Held open whole completion |
| Best fit | Short replies, batch jobs | Interactive chat and agents |
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Claiming streaming makes generation faster. It does not. Throughput and total decode time are unchanged. Only the time to first visible content drops, which is a user experience win, not a speedup.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.