Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Re: make perl release memory

by batkins (Chaplain)
on Jun 19, 2003 at 17:37 UTC ( #267285=note: print w/ replies, xml ) Need Help??


in reply to Re: make perl release memory
in thread make perl release memory

I've tried this argument as well, pointing out that iexplore often consumes more memory than my app. mysqld consumes around 40MB; opera takes about 25MB. I personally don't see much of a problem with these figures, so I think I may just have to give up on these users. If they're not willing to recognize that 25MB _isn't that bad_ then forget them. :)

The other thing is that when I open new windows in my app (it's Tk-based) or perform certain actions, the memory increases slightly. I've personally never seen it go beyond 27MB, even after days of usage and hundreds of windows being opened. So I guess what I want to know is: is this indicative of a memory leak, or is it something I shouldn't worry about?

This project can be downloaded from the link in my sig if anyone feels the need to test it out.

Thanks for your answers, everyone!

Bill


milkbone - perl/tk instant messaging - it's the only way to fly


Comment on Re: Re: make perl release memory
Re: Re: Re: make perl release memory
by Jenda (Abbot) on Jun 19, 2003 at 18:06 UTC

    If you open and close the same window many times does the used memory keep growing? If not then there's no leak in that part. It's next to impossible to prove a program has no leaks (especialy in Perl), but if you run it for long and do not see a problem I don't think it's necessary to care much :-)

    As someone (sorry don't remember who) has in his/her signature: Worry only about the things you have to implement.

    Jenda
    Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.
       -- Rick Osborne

    Edit by castaway: Closed small tag in signature

Re: Re: Re: make perl release memory
by smalhotra (Scribe) on Jul 23, 2003 at 12:42 UTC
    Bill,
    I think it's fitting to mention when you say that 25Mb is not that bad that Milkbone (I'm assuming that's what you're talking about) is an instant messenger app. I remember before you re-tuned it, the memory usage was close to 100Mb. When I'd compare it to AIM/Yahoo/MSN, each of those used under 10Mb. And usually my AIM is only at about5-6Mb. Compared to that, the 25Mb footprint of Milkbone did seem like a lot.
    <aside>Anyways, I hope things have been well. Sorry I haven't kept up with *Mercury*, maybe I'll look at it when I get back to school.</aside>

    $will->code for @food or $$;

      Sheesh, that's enough to make me put on the Grumpy Old Guy hat. An IM app ought to weigh in at less than a 1M memory footprint, exclusive of logs. (Though if you have more than 100-200K of log data you may need to get out more :)
        I'm quite young but I remember when I first got online, we would use "talk" for all instant messaging. Need to know who's online? Use finger. Need multiple chat windows? Open a new shell. Need to send a file? Use email. Need to alert all your buddies when you went online? "write" to all them. It had all the features of any modern IM app even to the point that each character showed up as you typed! We still don't have that in the "new" apps. Blah, gimme *nix or gimme death.

        $will->code for @food or $$;

        I wholeheartedly agree. I'd _love_ to get milkbone's memory usage under 1 meg. Even under 10 megs would be better. I'm just not sure how to go about doing this. Even a simple Tk script that just displays a window uses 5.2 meg on my Win2K box. The numbers in Linux are similarly frightening.

        So if anyone has any tips on how to go about making Tk use less memory, please reply here or /msg me. It would help immensely. Or, if you've got a spare minute, pick up the milkbone source (milkbone.org) and let me know if there's anything majorly wrong with the way it works. I'm afraid, though, that this is an inevitable consequence of using Tk. Thanks, Bill


        milkbone - perl/tk instant messaging - it's the only way to fly

        You know anyone who'll debug two million lines of code for what I get this job?
        - Dennis Nedry

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://267285]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (12)
As of 2014-04-16 20:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (433 votes), past polls