Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 56b3a40

Browse files
committed
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!
1 parent 2674aac commit 56b3a40

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/io.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1373,7 +1373,7 @@ class TextIOWrapper(TextIOBase):
13731373
write contains a newline character.
13741374
"""
13751375

1376-
_CHUNK_SIZE = 128
1376+
_CHUNK_SIZE = 2048
13771377

13781378
def __init__(self, buffer, encoding=None, errors=None, newline=None,
13791379
line_buffering=False):

0 commit comments

Comments
 (0)