Exponential time increase in garbage collection

Neil Schemenauer nas at python.ca
Sat May 18 17:38:38 EDT 2002


Why you think the time is spent in GC?  It sounds like the malloc
implementation is trying to defragment memory on free().  The current GC
has quadratic cost while allocating objects but it does not for
deallocating objects.  Can you try adding "gc.disable()" to the
beginning of your program and see if the problem goes away?

  Neil





More information about the Python-list mailing list