Commit 4cbb929
authored
perf(http2): reserve minimal send capacity when piping request bodies (#4149)
Reserving the full chunk length makes every in-flight stream a heavyweight
claimant in the connection-window distribution for as long as it waits for
capacity, which is costly once the streams sharing a connection collectively
demand more than the window the peer advertises.
The chunk is still only reserved against once it is in hand, so capacity can
never be pinned by a body that produces nothing (#4003). h2 raises the
requested send capacity to the buffered length inside `send_data`, so the
demand eventually signalled to the peer is unchanged; only the transient claim
held while the stream waits for its first byte of capacity differs.1 parent 8a98d13 commit 4cbb929
1 file changed
Lines changed: 15 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
225 | 234 | | |
226 | 235 | | |
227 | 236 | | |
| |||
0 commit comments