[New-bugs-announce] [issue13393] Improve BufferedReader.read1()
report at bugs.python.org
Sun Nov 13 05:15:01 CET 2011
New submission from Antoine Pitrou <pitrou at free.fr>:
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.
components: IO, Library (Lib)
stage: patch review
title: Improve BufferedReader.read1()
versions: Python 3.3
Added file: http://bugs.python.org/file23675/bufioread1.patch
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce