Re: Memory consumption of PyDS

Rudy Schockaert <[email protected]> Sun, 25 Apr 2004 21:31:08 +0200
Newsgroups gmane.comp.pythin.pyds.devel
Message-ID <[email protected]>
I've been investigating my problem, but not with a lot of succes.
I managed to get the monitor working, but couldn't get much usefull 
information out of the gc.get_objects().
For most of the entries in the returned list I cannot determine which 
kind of object it is, because I get the following error:

warning: exceptions.KeyError '__repr__' 
[C:\Python23\lib\site-packages\medusa\monitor.py|found_terminator|96] 
[C:\Python23\lib\site-packages\PyDS\MacrosTool.py|__getattr__|239]

I guess these are objects that don't have the __repr__ function?

I then just printed the length of the list and noticed that for each 
manual update of one of my feeds, 74 objects were added to the list.
Any hints on how I could continue trying to find the leak would be very 
welcome.

Ciao, Rudy

P.S. Georg, any idea when 0.7.2 will be released? Just want to know if I 
should botter getting it out of CVS or not.


Georg Bauer wrote:

> Hi!
>
> Am Dienstag, 13.04.04 um 01:58 Uhr schrieb Jeremy Bowers:
>
>> to create a bona-fide memory leak in pure Python. However, I was 
>> playing with weakrefs and circular structures which almost certain 
>> exacerbated the problem; PyDS doesn't use weakrefs so I would hope 
>> this wouldn't apply.
>
>
> Oh, but it does use weakrefs ...
>
> But I would say that's a bug if the weakref usage in PyDS really 
> triggers memory leaks, as  it's mostly stuff like "getToolByNamespace" 
> and similar situations where weakrefs are used - so both weakrefs and 
> normal refs would go out of scope anyway. Weakrefs came into play with 
> 0.7.1, I think.
>
> I will check your gc.get_objects hint. Should be doable with a page in 
> the StatusTool and some code that formats the output.
>
> bye, Georg
>