Is this a bug? Python intermittently stops dead for seconds

Giovanni Bajo raNOsky at deveSPAMler.com
Sun Oct 1 19:40:35 CEST 2006


Steve Holden wrote:

> I think you'll find that most programs that eat through memory in this
> way will exhibit pretty much the same behaviour. If you *know* your
> program isn't creating data cycles, just turn the GC off and rely on
> reference counting. That won't save you from paging when you
> eventually exhaust physical memory. Nothing can.

Even better, if you know that you're *creating* tons of objects without
creating many *discardable* cycles at the same, it's better to turn off GC
collection during loading, and only do a single pass (gc.collect()) when you
are done with the allocations.
-- 
Giovanni Bajo





More information about the Python-list mailing list