Btw: to find arrays easily for those who want to help out:

                foreach namespace [namespace children ::] {
                        puts "NS: $namespace"
                        if { $namespace == "::gnocl" } {continue}

                        namespace eval $namespace {
                                set arrs [list ]
                                foreach var [concat [info commands] [info 
vars]] { 
                                        if {[array exists $var]} { lappend arrs 
$var }  
                                } 
                                puts "$arrs"

                        }
        
                }

Op wo, 19-04-2006 te 19:05 +0200, schreef Karel Demeyer:
> Op wo, 19-04-2006 te 12:35 -0400, schreef Youness Alaoui:
> > the efforts are worth it I'm sure, and they are very well apreciated!!! I  
> > noticed some memleaks too (we have so many omg!) :
> > open amsn, do a "llength [image names]" it should return 100s.. then  
> > connect, it becomes 200.. open a chat window, it becomes 245, close a chat  
> > window, it goes down to 235 (while it should be 200 not 235), open again,  
> > goes up to 245, close, goes down to 235.. open a chatwindow with someone  
> > else, goes up to 247, close it, goes down to 237...
> > I noticed my amsn took a lot of memory and I had I think around 900 images  
> > opened... closed all I could (user_pic, smallpic, etc... all user images),  
> > and it went down to 600.. which is still a lot..
> 
> I really think this is fixed in the long run.  We just use a lot of
> images.  Therz are some things that could be made better still .. which
> By heart:  we have per standard smiley trigger a copy of the smiley ->
> should be saved by name or by only one trigger
> We really use a lot pictures:
>       the scrollbar base pixmaps
>       per scrollbar widget some pixmaps (all the protocol windows, the main
> window, every chatwindow)
>       a combobox picture
>       per smiley trigger a picture (could be enhanced)
>       per custom smiley a picture
>       dps
>       smaller version of dps  for notificatio
>       tiny dp if dp_on_cl
>       the "mainbar"
>       trayicon pixmaps
> So, I really worked on this to give 'm all a comprehensive name (check
> my latest commits) so we can keep track of 'm very easily so we don't
> duplicate etc.  There's no substancial leak here imo.
> 
> 
> > also, check for :
> > info commands ::http::*
> > there are a lot of http tokens that are never closed.. you can do this :
> > set memleak 0; foreach tok [info command ::http::*] { catch { incr memleak  
> > [string length [array get $tok]] } }; puts $memleak
> > it should give you how much space "as a string of characters.." (doesn't  
> > count internal representation of array and of unicoded string (2 bytes a  
> > char))) is used by those tokens... that are never [http::cleanup $tok]..  
> > after opening amsn, I think I had 100Kb used by that already...
> 
> 
> Well; the leak I found in the balloon code and the webcam code is also
> about arrays that are always growing and growing.  So that was the next
> thing I was looking into.  I only looked for "global" arrays though
> (those who come up in "info globals.  
> I don't have this problem with the ::http:: stuff right now.  Is it
> because I don't log in over http ? should I webcam first ? (as I found
> some ::http:: references in msncam.tcl)
> 
> Maybe I should do some:
> foreach namespace in namespaces { namesapce eval $namespace {[info
> commands]}
> 
> and then check those outputs for arrays with [array exists ..] to know
> of more arrays ?
> 
> I guess we don't have any "strings or lists we keep appending stuff on",
> right ?
> 
> 
> Karel
> 
> > KKRT
> > 
> > 
> > On Wed, 19 Apr 2006 10:52:00 -0400, Karel Demeyer <[EMAIL PROTECTED]>  
> > wrote:
> > 
> > > Hi,
> > >
> > > I found 2 small memleaks in webcam.tcl but as I don't know anything
> > > about this code apart from the gui, I'd like someone other to fix it.
> > > The first is about entries in the array 'objects' that are never unset.
> > > Every webcam session adds info to this array which I guess could be
> > > unset after the session or whenever it's appropriate.
> > > The second is about the images it creates.  I made it create tmpX images
> > > as I've done in other places throughout our codebase.  Every webcam
> > > session seems to add an image that isn't destroyed.  This should be
> > > destroyed too.
> > >
> > > I hope all these efforts would be worth it and we'll have a less leaking
> > > aMSN for the next release maybe ? :)
> > >
> > > Karel.
> > >
> > >
> > >
> > >
> > > -------------------------------------------------------
> > > Using Tomcat but need to do more? Need to support web services, security?
> > > Get stuff done quickly with pre-integrated technology to make your job  
> > > easier
> > > Download IBM WebSphere Application Server v.1.0.1 based on Apache  
> > > Geronimo
> > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> > > _______________________________________________
> > > Amsn-devel mailing list
> > > [email protected]
> > > https://lists.sourceforge.net/lists/listinfo/amsn-devel
> > 
> > 
> > 
> 
> 
> 
> -------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Amsn-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/amsn-devel
> 



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Amsn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amsn-devel

Reply via email to