This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients pitrou
Date 2011-11-13.04:15:00
SpamBayes Score 9.081531e-06
Marked as misclassified No
Message-id <1321157701.74.0.443809978111.issue13393@psf.upfronthosting.co.za>
In-reply-to
Content
The main current user of BufferedReader.read1() is TextIOWrapper. In this context, read1() is used to signal that we want to bypass binary buffering as much as possible, since TextIOWrapper does its own buffering. The current read1() implementation is therefore suboptimal: it copies data around, and limits the number of bytes that you're allowed to get in one call (even if the raw stream would satisfy more).

Attached patch improves read1() in this respect. Also, a separate modification of TextIOWrapper is needed to take advantage of it, which I will attach in another patch.
History
Date User Action Args
2011-11-13 04:15:02pitrousetrecipients: + pitrou
2011-11-13 04:15:01pitrousetmessageid: <1321157701.74.0.443809978111.issue13393@psf.upfronthosting.co.za>
2011-11-13 04:15:01pitroulinkissue13393 messages
2011-11-13 04:15:00pitroucreate