Message73030
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. |
|
Date |
User |
Action |
Args |
2008-09-11 14:07:28 | pitrou | set | recipients:
+ pitrou, dalke |
2008-09-11 14:07:12 | pitrou | link | issue3531 messages |
2008-09-11 14:07:12 | pitrou | create | |
|