[reportlab-users] Re: Generating huge reports and memory consumption

François Pinard reportlab-users@reportlab.com
03 Jan 2003 16:17:34 -0500


[Robin Becker]

> OK Francois, I tried this dummy test [...]  So I don't seem to have a lot
> hanging about.  When I change the upper limit to 900 I see [...]  so only
> the same things are hanging about. Even so, when I check the memory usage
> it still increases with total page count.

So, my little tool is seemingly not catching how your memory is consumed.
It might be the case when the memory is mostly made up with dicts or lists
ultimately made up of strs or ints (via other dicts or lists), as it does
not seem that making objects of these simple types bump the reference count
of their types, while it does for objects instantiated from user-defined
classes.  These implementation things are still a bit fuzzy in my head...

There are functions in the `gc' module giving access to all objects.  That
might be another avenue for exploration, yet I wonder how one uses these for
collecting measurements, without altering too much what we are trying to
measure...  Nothing near deep as the Heisenberg principle, however! :-)

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard