Memory leaking?
Posted by: foobarly
Date: October 04, 2007 01:14PM

I am using K-Meleon 1.1.2 on a Pentium III 1 Ghz machine with 512 MB RAM and XP Pro; as the 'puter is always on I couldn't stop noticing that if KM is left in memory from one day to the other Private Memory usage (according to Sysinternals' Process Explorer) will go over 100 megs, some times even close to 200.

As instructed by this and other threads, I have tried minimize and restore and any different solutions suggested, but only restarting KM seems to do the trick. Is there a memory bug here?



Edited 1 time(s). Last edit at 10/04/2007 01:22PM by foobarly.

Re: Memory leaking?
Posted by: Terry
Date: October 04, 2007 09:14PM

Generally, when you minimize K-Meleon, it will return the memory or cache it. There is a Boolean value that you can add to about:config and set it to true: config.trim_on_minimize This works with most Mozilla browsers.
Don't know if you have done this before. Type about:config in the URL bar. You will receive a warning about changing anything. Just continue.
A huge list of variables will come up. They are in alphabetical order so you can page down to those beginning with "c" to see if this value is present. If you want to try it, right click and choose New and then Boolean value. Type in config.trim_on_minimize (or copy it from here and paste it in) and default it to true. See if that will enable it to reduce memory when you minimize K-Meleon.

Re: Memory leaking?
Posted by: guenter
Date: October 04, 2007 09:48PM

& If You vaguely know the keyword for a specific option You can also try to find it by typing into the Filter field. Fortunately that works too since some versions smiling smiley

& foolbarley, Your observation is possibly a setting or an extension since AFAIRmemember/know Dorian has fixed all small leaks that existed once.



Edited 1 time(s). Last edit at 10/04/2007 09:50PM by guenter.

Re: Memory leaking?
Posted by: jmillar
Date: October 06, 2007 07:11AM

In my experience there DOES seem to be a memory leak. I can't leave K-Meleon from one day to the next with 10 or more layers open. Memory use goes through the roof, making the whole thing of leaving layers open for ongoing work an exercise in futility. I put a great deal more RAM in the system, but even then mem usage will grow from day to day.

An excellent workaround till the Mozilla GRE gets sorted out would be a session recovery option for all layers. This is one major reason for using Firefox which also leaks memory, because I can close it, purging memory, and everything will come up again as I left it.

That is the major reason for not adopting K-Meleon as my main tool, as well as Firefox's better handling of bookmarks. K-Meleon's bookmark editing is a bit of a pain and it has a hardcoded bookmark limit. Sure wish I was proficient enough as a coder to hack away at the source, and see if I can improve it!
I recently saw an external bookmark manager that shows promise, but it's shareware, not open source, unfortunately. But I may consider it.

K-Meleon is MUCH nimbler and friendly in a Windows environment, and for routine tasks I prefer it as my default application, but for serious work I must use the *cough* 'boat anchor'.

It's funny the way applications grow over the years. I used 0.8 and 0.9 versions of 'Firebird' on an obsolete 166 Pentium MMX, and it could cope handily!

Re: Memory leaking?
Posted by: foobarly
Date: October 08, 2007 08:47AM

I know a bit about 'about:config' tweaking, and in the two running installs of K-Meleon on my computer, one had the 'config.trim_on_minimize' option that Terry mentions. I added the option to the other one, where just this morning I got the following memory status:


[http:// i23.tinypic.com/jb49li.png]

I also think that values for explorer.exe are somewhat inflated, so I'm looking into this too... But at least this time, there is outside confirmation that the issue isn't just happening to me.

Re: Memory leaking?
Posted by: Terry
Date: October 08, 2007 09:39PM

There is no getting around it, K-M in your illustration is using a lot of memory. I believe its basic footprint should be around 73,000 to 76,000 and would go up with the amount of layers and amount of java and html code per webpage (according to precess explorer). Normally, however, as you shut down layers that memory is returned. With none or one opened, it should be basically no larger than when it was started.
Does your task manager show this amount also - or something equivalent?
How large do allow for the memory and disk cache? Do you have any extensions installed that might explain its size?
The K-M I am using is the 1.12 on XP. It may be that you will have to reinstall it since something is broken in your present profile.

Re: Memory leaking?
Posted by: foobarly
Date: October 09, 2007 09:18AM

That was from an (almost) fresh instal of K-Meleon 1.1.2, which was left unattended with only 4 layers open from Thursday afternoon to Monday morning. Memory and Disk Cache are 5000 and 50000 KB -- the default values. No known extensions installed.

Plugins installed:
* Mozilla Default Plug-in (npnul32.dll)
* Orbit Downloader (nporbit.dll)
* Shockwave Flash 9.0 r28 (NPSWF32.dll)
* MNG Plug-in 1.0.7 (npmngplg.dll)
* Morgan Multimedia JPEG2000 Netscape/Mozilla PlugIn (npjp2.dll)
* Windows Media Player Plug-in Dynamic Link Library (???)

Windows Task Manager wasn't checked, for I find Sysinternals (Which BTW has been acquired by Micro$oft) Process Explorer much more powerful, informative and reliable. But on a current check, with an overnight resident instance of the same K-Meleon, I got this:


[http:// i20.tinypic.com/169f15i.png]

I shouldn't have to state that whenever KM memory usage goes over 100 MB, it turns unresponsive and lagging. I found a page reporting similar issues with Firefox 2.0 (I immediately checked for IEtab, which is absent from this install):

http://genotrance.wordpress.com/2006/12/17/unreasonable-firefox-memory-usage/#more-65
[http:// genotrance.wordpress.com/2006/12/17/unreasonable-firefox-memory-usage/#more-65]

Maybe some of this might help anyone...

Re: Memory leaking?
Posted by: Terry
Date: October 09, 2007 11:44AM

Thank you foobarly; you are being extraordinarily patient in answering my questions. Both Process Explorer and Taskmanager are tools. For example, if you have taskmanager up and minimize K-M, the memory usage should drop radically. As you let K-M just sit there with no activity, the memory usage should then build to anywhere from a quarter to half of what it displayed during full usage.

With Process Explorer with the bottom panel displayed, you can watch how processes are invoked for a certain page in K-M and then how such processes reach an endpoint, meaning that their memory is surrendered back to the system since they are no longer needed. When a process does not display an endpoint (process colored red if you go by the default coloring scheme), this is a memory leak.

It seems to me that Dorian uses a lot of Windows native modules to accomplish what K-M does and by-passes the Mozilla functions that can do the same thing. It seems to me, he has done an admirable job with the Windows modules, so comparisons to Firefox are not always pertinent.

It is entirely up to you, but I suspect that one of your extensions may be where the problem lays. You could watch for the memory usage actively under Process Explorer to see if a process does reach an endpoint and surrender its memory or if it duplicates it and retains memory. Or, you could discontinue one extension at a time to see how your memory usage responds. Then, there is always the problem of background processes that may be intercepting K-M's tcip strings and holding them for their own purposes making K-M look like the culprit.

Re: Memory leaking?
Posted by: foobarly
Date: October 09, 2007 01:28PM

Yowha! Now you took me way out of my preferred depth -- but I will try to follow in the next few days.

I just need to understand what you mean by extensions here, 'cause I had the idea that they where stuff that you put on after the install (which I didn't, BTW). Never mind my patience, thanks for all the fish... grinning smiley

Re: Memory leaking?
Posted by: Terry
Date: October 09, 2007 02:48PM

I believe the following would be those extensions that would be considered "additions":
Orbit Downloader (nporbit.dll)
MNG Plug-in 1.0.7 (npmngplg.dll)
Morgan Multimedia JPEG2000 Netscape/Mozilla PlugIn (npjp2.dll)
Some call them extensions; some call them plug-ins - basically, it is what you get when you type about:plugins in the url bar.
I believe that extensions that would be considered "standard" would be things that work with Windows as a whole (though some require a "Mozilla" installation) - Shockwave, Quicktime, RealPlayer, Windows Media Player, FlashPlayer and the ubiquitous Java to name a few.

Re: Memory leaking?
Posted by: Terry
Date: October 09, 2007 05:44PM

By the way, there is a modified free taskmanager available called dtaskmanager here: http://dimio.altervista.org/eng/ It has several features that taskmanager doesn't.

Re: Memory leaking?
Posted by: desga2
Date: October 09, 2007 06:35PM

Also Daphne is a good task manager.

Re: Memory leaking?
Posted by: foobarly
Date: October 22, 2007 09:59PM

After testing for a while -- with the supicious plugin culprits disabled (altough they never caused any problems with prior KM versions), the issue reported remains...

From now on I'll be assuming that for whatever reason KM version 1.1+ leaks memory.

Caveat emptor!

Re: Memory leaking?
Posted by: BlackholeForever
Date: November 12, 2007 03:19PM

I think this problem is rooted in the Mozilla code. I was on cdcovers.cc yesterday with Firefox, downloading various covers and watched Firefox [one tab] grow to 450MB in memory use very quickly.

K-Meleon seemed a little better about this, but I think it still got close to 200MB before I was done.

K-Meleon forum is powered by Phorum.