Message187878
> What if just use io.BufferedReader?
>
> if not isinstance(file, io.BufferedReader):
> file = io.BufferedReader(file)
>
> (at start of _Unpickler.__init__)
Two problems:
1. semantically, it is wrong; the BufferedReader will read bytes beyond
the pickle end, so the underlying stream will be desynchronized
2. performance-wise, it doesn't solve the issue either: read() method
calls are costly, even on an optimized C object |
|
Date |
User |
Action |
Args |
2013-04-26 21:45:14 | pitrou | set | recipients:
+ pitrou, rhettinger, alexandre.vassalotti, Arfrever, asvetlov, neologix, serhiy.storchaka |
2013-04-26 21:45:14 | pitrou | link | issue17810 messages |
2013-04-26 21:45:14 | pitrou | create | |
|