mirror of
https://github.com/element-hq/synapse.git
synced 2026-11-06 21:47:31 +00:00
Rather than drip-feeding an already-encoded response body through a producer in 4KB chunks, hand the whole body to the transport at once and only use a producer to delay finishing the request until the transport has flushed it. The transport only resumes a paused producer once its 64KB send buffer is completely empty, so the old approach could send at most ~64KB per reactor tick, which makes large responses crawl on a busy worker.