Buffer the whole export and the caller waits
six seconds for the first byte.
buffered — Results.Ok(await ReadAllRowsAsync(ct))
first byte 6,300 ms
streamed — return ReadRowsAsync(ct)
first byte 29 ms
0 ms
both finish near 6,400 ms — the six-second drain, not the response, sets the floor
6,430 ms
buffered
streamed
time to first byte
6,300 ms
29 ms
peak managed heap
39.4 MB
17.0 MB
response body
21.1 MB
21.1 MB
the price: a failure after the first flush
status
200 OK
content-length
(none — chunked)
reading the body
throws
The status line left with the first chunk, so there is no 500 to send. A client that retries on non-2xx will not retry this.
measured: .NET 10 · 200,000 rows · source pages every 500 rows, 15 ms per page
gdhami.net