From: Antoine Pitrou <solipsis@pitrou.net>
Date: Mon, 15 Dec 2008 23:01:43 +0000 (+0000)
Subject: Issue #4663: increase the chunk size to improve TextIOWrapper performance on small... 
X-Git-Tag: v3.1a1~692
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=56b3a40e057954f4bdbf8e432755980a226900aa;p=python

Issue #4663: increase the chunk size to improve TextIOWrapper performance on small reads.
Text I/O is still 10x to 100x slower than 2.x!
---

diff --git a/Lib/io.py b/Lib/io.py
index af5a144f27..96b3e5d4d4 100644
--- a/Lib/io.py
+++ b/Lib/io.py
@@ -1373,7 +1373,7 @@ class TextIOWrapper(TextIOBase):
     write contains a newline character.
     """
 
-    _CHUNK_SIZE = 128
+    _CHUNK_SIZE = 2048
 
     def __init__(self, buffer, encoding=None, errors=None, newline=None,
                  line_buffering=False):