]> granicus.if.org Git - python/commitdiff
Issue #4663: increase the chunk size to improve TextIOWrapper performance on small...
authorAntoine Pitrou <solipsis@pitrou.net>
Mon, 15 Dec 2008 23:01:43 +0000 (23:01 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Mon, 15 Dec 2008 23:01:43 +0000 (23:01 +0000)
Text I/O is still 10x to 100x slower than 2.x!

Lib/io.py

index af5a144f27abc36affffc0891f775b74967b3fed..96b3e5d4d4b0df6b882b343564bfc9c72ef8bf44 100644 (file)
--- 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):