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

Terry Reedy tjreedy at udel.edu
Fri Aug 30 17:27:55 CEST 2002


"Michal Vitecek" <fuf at mageo.cz> wrote in message
news:mailman.1030710614.27326.python-list at python.org...
> okay, thank you. it'll be pretty hard to describe it so much in
detail,
>  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
window?

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

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