]> granicus.if.org Git - python/commitdiff
Mention that seek and tell over a TextIOWrapper can be very slow.
authorAntoine Pitrou <solipsis@pitrou.net>
Fri, 4 Feb 2011 20:11:11 +0000 (20:11 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Fri, 4 Feb 2011 20:11:11 +0000 (20:11 +0000)
Doc/library/io.rst

index a97fae0f522ec12dd18b3621d35b7329ef964554..26ddd8f22dd78c7a147ed08381a74ea081faf1ab 100644 (file)
@@ -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`.