This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients anthon, dalke, pitrou
Date 2008-09-11.14:07:12
SpamBayes Score 2.1773585e-07
Marked as misclassified No
Message-id <1221142028.5667.9.camel@fsol>
In-reply-to <48C924A4.10005@mnt.org>
Content
Le jeudi 11 septembre 2008 à 16:01 +0200, Anthon van der Neut a écrit :
> The thing however was resolved by reading multiple smaller chunks indeed
> 1Mb if the filesize exceeds 1Mb (in the latter case the original read()
> is done.

It's too complicated. Just use chunks in all cases (even small files)
and you are done. There should be no visible performance downside to
doing so.

Using fixed-size chunks to read binary data from a file of an unknown
size isn't a Python-specific idiom, really. It's the same in C, C++,
PHP, etc.
History
Date User Action Args
2008-09-11 14:07:28pitrousetrecipients: + pitrou, dalke
2008-09-11 14:07:12pitroulinkissue3531 messages
2008-09-11 14:07:12pitroucreate