How pickle helps in reading huge files?

Chris Angelico rosuav at gmail.com
Wed Oct 16 05:09:15 EDT 2013


On Wed, Oct 16, 2013 at 7:51 PM, rusi <rustompmody at gmail.com> wrote:
> On Wednesday, October 16, 2013 12:35:42 PM UTC+5:30, Stéphane Wirtel wrote:
>> Keep it in memory
>
> Thats a strange answer given that the OP says his file is huge.
> Of course 'huge' may not really be huge -- that really depends on the h/w he's using.

Most people's idea of a big file is one that has a few thousand lines
in it. That may be pretty huge in terms of manual work, but it'd fit
inside memory easily enough. And even if it really is bigger than
memory, chances are you can use your page file and still keep it in
"memory" - and that's generally the easiest, if perhaps not the most
efficient, solution.

ChrisA



More information about the Python-list mailing list