When sending a message here:
|
data = self.connection.send(event) |
data can be compressed and it can be CPU-intensive depending on the size of the data. Do you think this call could be wrapped in a thread? There would need to be a backend-specific abstraction, but for instance for asyncio it would be equivalent to:
data = await asyncio.to_thread(self.connection.send, event)
When sending a message here:
hypercorn/src/hypercorn/protocol/ws_stream.py
Line 343 in ed6cd40
data can be compressed and it can be CPU-intensive depending on the size of the data. Do you think this call could be wrapped in a thread? There would need to be a backend-specific abstraction, but for instance for asyncio it would be equivalent to: