[Twisted-Python] Reducing memory footprint of twisted app?
Marcin.Kasperski at softax.com.pl
Tue Aug 15 06:36:16 EDT 2006
Not an exact question, but rather 'searching for ideas'.
I have some twisted app, which uses more memory than I would like it to.
I tried analysing it a bit (mainly using gc module object list and
items of different types) and it seem to me that there is something
in it. My application uses in a lot of places generator idiom
which yield wrapped with defer.deferredGenerator). And, as there seem to be
a lot of anonymous functions and tuples allocated, I suspect that maybe
functions, deferreds and related params and closures live longer then I
Any ideas of what could I do to track it down? In particular, is it
possible to somehow
use introspection to find which lambdas and deferreds are allocated
while the program
is running? Are there any suggestions on how to code deferredGenerators
allocated memory (maybe, for instance, I should try to turn local
object attributes, or opposite, or ...)
Also, if anybody could me point to any interesting resources about
momory usage, I would be grateful.
Tried googling for some time, but apart of zope trackRef I did not found
More information about the Twisted-Python