classification
Title: asyncio: _ProactorReadPipeTransport reads by chunk of 32 KiB: chunk size should be configurable
Type: performance Stage:
Components: asyncio Versions: Python 3.8
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: asvetlov, vstinner, yselivanov
Priority: normal Keywords:

Created on 2018-06-07 10:44 by vstinner, last changed 2018-06-07 10:44 by vstinner.

Messages (1)
msg318923 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-06-07 10:44
_SelectorTransport has the class attribute:
    max_size = 256 * 1024  # Buffer size passed to recv().

But _ProactorReadPipeTransport uses an hardcoded chunk size of 32 KiB. It would be nice to allow to configure this size.

By the way, _SelectorTransport.max_size has no public API to change the default value for the whole process. The attribute can only be set per socket, since _SelectorTransport is private. By the way, is the attribute documented?
History
Date User Action Args
2018-06-07 10:44:35vstinnercreate