New submission from Antoine Pitrou <pit...@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)
files: bufioread1.patch
keywords: patch
messages: 147549
nosy: pitrou
priority: normal
severity: normal
stage: patch review
status: open
title: Improve BufferedReader.read1()
type: performance
versions: Python 3.3
Added file: http://bugs.python.org/file23675/bufioread1.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue13393>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to