summaryrefslogtreecommitdiffstats
path: root/Doc/library/io.rst
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-02-04 20:11:11 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2011-02-04 20:11:11 (GMT)
commiteefb97cb579f8822868ce98ace820da5788e9ff7 (patch)
tree3072ef5176e416073614b1fce07912574100994a /Doc/library/io.rst
parentd77520a426769a2d255433750822040830554658 (diff)
downloadcpython-eefb97cb579f8822868ce98ace820da5788e9ff7.zip
cpython-eefb97cb579f8822868ce98ace820da5788e9ff7.tar.gz
cpython-eefb97cb579f8822868ce98ace820da5788e9ff7.tar.bz2
Mention that seek and tell over a TextIOWrapper can be very slow.
Diffstat (limited to 'Doc/library/io.rst')
-rw-r--r--Doc/library/io.rst2
1 files changed, 2 insertions, 0 deletions
diff --git a/Doc/library/io.rst b/Doc/library/io.rst
index a97fae0..26ddd8f 100644
--- a/Doc/library/io.rst
+++ b/Doc/library/io.rst
@@ -814,6 +814,8 @@ Text I/O over a binary storage (such as a file) is significantly slower than
binary I/O over the same storage, because it implies conversions from
unicode to binary data using a character codec. This can become noticeable
if you handle huge amounts of text data (for example very large log files).
+Also, :meth:`TextIOWrapper.tell` and :meth:`TextIOWrapper.seek` are both
+quite slow due to the reconstruction algorithm used.
:class:`StringIO`, however, is a native in-memory unicode container and will
exhibit similar speed to :class:`BytesIO`.