Caliper — time to first painted output

URL
https://lets-quill.vercel.app/blog/cmvhv3jo80002f4y47l8p1adb
Measured button
button /^(re)?generate$/i
Steps
share on socials
Output selector
textarea
Date
Nov 14, 2026, 1:48:57 PM GMT+5:30
Runs
2

Verdict

People waited 1514 ms for the first word in the one warm run.

2 things to look at ↓

Advice

In the browser

Run 2, the one warm run: 1514 ms from click to first word

click → request sent 3 ms
browser: response headers received 926 ms over
headers → first paint 585 ms over

Where to look — browser

1 warm run.

headers → first paint: 585 ms — 5.8× its 100 ms limit, in 1 of 1 warm runs; 39% of the browser total

Limit: Nielsen / RAIL: under 100 ms feels instant. These limits were written for whole pages or interactions; applying them to one part of the wait is Caliper's reasoning.

Things to check:

  • could be headers sent before the first real chunk, so the wait for the reply shows up here
  • could be the client buffering chunks before showing them
  • could be a proxy or compression buffering the stream
  • could be parsing or rendering each chunk

Learn more: https://developer.mozilla.org/en-US/docs/Web/API/Streams_API

Caliper sees timings, not your code — these are common causes, not a diagnosis.

Also over their limits

Inside the server

From separate marked runs, on the server's clock. Never added to the browser timings above: different runs, different clocks.

Marked visit 1, the one visit: 1046 ms from arrival to server: first bytes sent

postgres 506 ms over
model call → first bytes sent 540 ms over

Empty parts of a row are time no span covers.

Request Map — what's inside each AI request (sizes only)

Prompt sizes (marked visit 1)

UTF-8 bytes of each message's text as your app passed it to run.prompt(); not tokens.

Source: who wrote the text, as your app labelled it.

messagebytessharesource
1 system249943%
instructions2499app labelled by app
rest of message 10unknown not labelled
2 user332857%
author25user labelled by app
title33user labelled by app
code_snippet57app labelled by app
article3207user labelled by app
rest of message 26unknown not labelled
total5827
by source: app255644%app
by source: user326556%user
by source: outside00%outside
by source: unknown60%unknown

Where to look — server

1 marked visit, on the server's clock; never compared with the browser.

postgres: 506 ms — 5.1× its 100 ms limit, in 1 of 1 marked visits; 48% of the time to server: first bytes sent

a step your app named; Caliper can't see inside it.

It ended before the model call was sent (postgresEnd 506 ms, model call sent 506 ms), so all 506 ms of it came before the model call.

Limit: Nielsen / RAIL: under 100 ms feels instant. These limits were written for whole pages or interactions; applying them to one part of the wait is Caliper's reasoning.

Things to check:

  • could be waiting inside this step: network calls, other services, locks
  • could be work that runs on every request but could be cached or done earlier
  • could be steps running one after another that could run at the same time

Caliper sees timings, not your code — these are common causes, not a diagnosis.

Also over their limits

  • model call → first bytes sent: 540 ms — 1.2× its 450 ms limit, in 1 of 1 marked visits

Checks

Stop check

Stop button /^stop$/i, one extra run on a fresh page

Stop works (browser side)

pixels✓ passoutput stopped changing 0 ms after Stop
network✓ passPOST https://quill-backend.example/api/v1/social/cmvhv3jo80002f4y47l8p1adb/generate: aborted by the browser (net::ERR_ABORTED) 15 ms after Stop; 0 bytes after the abort
end✓ passno normal end (no requestfinished)
  • clicked Stop 651 ms after the first word, while the output was still changing
  • Model-side cancellation (hop 2: your server → the model provider) is not visible from the browser. An abort here only shows the browser dropped its connection; check server logs or provider usage to confirm generation stopped.
Details: every run, the data, request matching, server marks
Cold (run 1)
1,646 ms
The one warm run
1,514 ms
Worst (all runs)
1,646 ms

Timeline per run

  • click → fetch() called / request sent
  • CORS preflight
  • browser: response headers received
  • headers → first paint (streaming)
run 1 cold1,646 ms
5 ms
183 ms
1,182 ms
276 ms

POST https://quill-backend.example/api/v1/social/cmvhv3jo80002f4y47l8p1adb/generate → 200 · text/event-stream

chosen from 9 request(s): explains 84 of 85 output changes (body bytes ≤ 250 ms before each; 1 came before its first body byte), no other request explains any

share: 84 of 84 output changes from its first body byte (100%) — the first run asks below 95% (Caliper's own threshold, no outside source)

run 21,514 ms
3 ms
926 ms
585 ms

POST https://quill-backend.example/api/v1/social/cmvhv3jo80002f4y47l8p1adb/generate → 200 · text/event-stream

chosen from 8 request(s): explains 67 of 68 output changes (body bytes ≤ 250 ms before each; 1 came before its first body byte), no other request explains any

share: 67 of 67 output changes from its first body byte (100%) — the first run asks below 95% (Caliper's own threshold, no outside source)

Data

Segment (ms)run 1 (cold)run 2
Total1,6461,514
click → fetch() called / request sent4.82.6
CORS preflight182.7—
browser: response headers received1182.4926.1
headers → first paint (streaming)276.3done 5007 ms after paint585.2done 3267 ms after paint

Request matching and clock check

  • run 1 (cold) POST https://quill-backend.example/api/v1/social/cmvhv3jo80002f4y47l8p1adb/generate → 200 text/event-stream chosen from 9 request(s): explains 84 of 85 output changes (body bytes ≤ 250 ms before each; 1 came before its first body byte), no other request explains any share: 84 of 84 output changes from its first body byte (100%) — the first run asks below 95% (Caliper's own threshold, no outside source) clock check: response headers within 0.1 ms of Resource Timing
  • run 2 POST https://quill-backend.example/api/v1/social/cmvhv3jo80002f4y47l8p1adb/generate → 200 text/event-stream chosen from 8 request(s): explains 67 of 68 output changes (body bytes ≤ 250 ms before each; 1 came before its first body byte), no other request explains any share: 67 of 67 output changes from its first body byte (100%) — the first run asks below 95% (Caliper's own threshold, no outside source) clock check: response headers within 0.5 ms of Resource Timing

Inside the server: marks and spans

From separate marked runs, on the server's clock. Never added to the browser timings above: different runs, different clocks.

Inside the server (from 1 of 1 marked run) — ms after the request arrived, status 200

ms
Marks
postgresStart0
postgresEnd506
model call sent506
server: first bytes sent1046
Spans
postgrespostgresStart → postgresEnd506
model call → first bytes sent540
  • Workers time waits only — a span with only computation inside (no I/O) can read 0 ms.
  • first bytes sent = the server's first write to the browser. If your app writes anything before the model's reply (a heartbeat, an envelope), this is that write.
Run details
  • Server timings — pre-check: feature on, token accepted (expected 400 on the test id caliper.precheck)
  • Server timings — marked visit 1 of 1 sent x-caliper-run 94005205-e033-44d7-88fc-46c49ea32482 on POST https://quill-backend.example/api/v1/social/cmvhv3jo80002f4y47l8p1adb/generate (matched POST https://quill-backend.example/api/v1/social/cmvhv3jo80002f4y47l8p1adb/generate)