python slowdown after a longish time of running (garbage collector)

Terry Reedy tjreedy at
Fri Aug 30 11:27:55 EDT 2002

"Michal Vitecek" <fuf at> wrote in message
news:mailman.1030710614.27326.python-list at
> okay, thank you. it'll be pretty hard to describe it so much in
>  but here it goes:

What version of Python are you running?  And on what platform?
IE, what is the header displayed when you start up in the console

>  the problem is IMHO in the state generator that initializes lots of
>  objects (both builtin (list, tuples, dictionaries) and user made)
>  relies on the garbage collector to clean them up when they are

With CPython, the gc garbage collector only collects unreachable
cycles.  Everything else goes when, but only when, the reference count
goes to 0.  There have been reports of gc bogging down on some
platforms in some situations and some improvements have been made for
2.3.  You will find out if this is your problem by turning gc off as
holger suggested.

Terry J. Reedy

More information about the Python-list mailing list