Is this a bug? Python intermittently stops dead for seconds

Fredrik Lundh fredrik at pythonware.com
Sun Oct 1 11:46:57 EDT 2006


charlie strauss wrote:

> Could you clarify that for me.  GC really has three components
 > two it:  1) finding and freeing unrefernced memory by refer
 > refer counts 2)  cycle removal and 3)  defragementing the
 > storage stack.  If I turn off GC, don't I lose all of these?

CPython always does (1), only does (2) if cycle-breaking GC isn't 
disabled, and never does (3).

in your case, it's (2) that takes more and more time, simply because 
you're creating tons of non-trivial objects.  to see what's going on in 
there, add

     import gc
     gc.set_debug(gc.DEBUG_STATS)

to the top of your program, and look at the status messages that appear 
just before each "Big Gap" message.

</F>




More information about the Python-list mailing list