bpo-41273: asyncio's proactor read transport's better performance by using recv_into instead of recv by tontinton · Pull Request #21442 · python/cpython

kk456852

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).
By doubling the read buffer size we get better performance.

1st1

1st1 approved these changes Jul 14, 2020

shihai1991 pushed a commit to shihai1991/cpython that referenced this pull request

Aug 4, 2020
…using recv_into instead of recv (python#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.

shihai1991 pushed a commit to shihai1991/cpython that referenced this pull request

Aug 20, 2020
…using recv_into instead of recv (python#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.

xzy3 pushed a commit to xzy3/cpython that referenced this pull request

Oct 18, 2020
…using recv_into instead of recv (python#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.