creating really big lists

Paul Rubin http
Sat Sep 8 12:53:44 EDT 2007


Dr Mephesto <dnhkng at googlemail.com> writes:
> well, I want to (maybe) have a dictionary where the value is a list of
> 5 lists. And I want to add a LOT of data to these lists. 10´s of
> millions of pieces of data. Will this be a big problem? I can just try
> it out in practice on monday too :)

Yes, that may be a problem both because of the amount of memory
required, and because of how the GC works.  You may want to turn off
the GC while building these list.  Otherwise, think of some other
strategy, like files on disk.



More information about the Python-list mailing list