]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-41273: asyncio's proactor read transport's better performance by using recv_into...
authorTony Solomonik <tony.solomonik@gmail.com>
Tue, 14 Jul 2020 19:41:24 +0000 (22:41 +0300)
committerGitHub <noreply@github.com>
Tue, 14 Jul 2020 19:41:24 +0000 (12:41 -0700)
commit568fb0ff4aa641329261cdde20795b0aa9278175
treeca72a11fd5ac68d82b6f37c0484c22f27af3b525
parent2a5181829af394b82e8e8c917183c709ee72a2b7
bpo-41273: asyncio's proactor read transport's better performance by using recv_into instead of recv (#21442)

* bpo-41273: Proactor transport read loop to use recv_into

By using recv_into instead of recv we do not allocate a new buffer each
time _loop_reading calls recv.

This betters performance for any stream using proactor (basically any
asyncio stream on windows).

* bpo-41273: Double proactor read transport buffer size

By doubling the read buffer size we get better performance.
Lib/asyncio/proactor_events.py
Lib/test/test_asyncio/test_proactor_events.py
Misc/NEWS.d/next/Library/2020-07-11-00-15-01.bpo-41273.SVrsJh.rst [new file with mode: 0644]