Creating Long Lists
__peter__ at web.de
Tue Feb 22 11:06:24 CET 2011
Kelson Zawack wrote:
> The answer it turns out is the garbage collector. When I disable the
> garbage collector before the loop that loads the data into the list
> and then enable it after the loop the program runs without issue.
> This raises a question though, can the logic of the garbage collector
> be changed so that it is not triggered in instances like this were you
> really do want to put lots and lots of stuff in memory. Turning on
> and off the garbage collector is not a big deal, but it would
> obviously be nicer not to have to.
What Python version are you using? The garbage collection heuristic has been
tweaked in 2.7, see
More information about the Python-list