General :  K-Meleon Forum
General discussion about K-Meleon. 
How come KM consumes LESS memory than FF?
Posted by: penang
Date: March 08, 2010 12:53PM

KM uses the sme Gecko engine as FF, right?

I just ran some comparison, with a clean install of both FF and KM, without any plugin.

First test: Both browsers open 3 tabs.

Second test: Both browsers open 8 tabs.

Third test: Both browsers open 16 tabs.

Before I continue, here is the spec of my test machine:

4GB of RAM
Win XP Pro
Free Extended Task Manager by Extendsoft installed

What I did is, for first, second and third test, I put exactly same URL, in exactly same order of tab (tab one to aaa.com, tab two to bbb.com and so on), and then I use the "Free Extended Task Manager" to kill both FF and KM.

Then I click on FF and KM icons.

Both will tell me that they were closed unexpectedly and asked me if I want my old configuration back, and I click "Yes" to both KM and FF.

After both FF and KM finish accessing those websites, I use the "Free Extended Task Manager" to look at how much RAM FF and KM takes.

Here's what I found:

No matter it's 3 tabs or 8 tabs or 16 tabs, KM uses about 20-25% LESS memory than FF.

This is what I do not understand.

KM uses the same Gecko engine that powers FF, right?

Then how come FF consistently consume MORE memory than KM?

Anyone can give me a heads-up on this?

Thanks !!

Options: ReplyQuote
Re: How come KM consumes LESS memory than FF?
Posted by: siria
Date: March 08, 2010 02:35PM

Just a note, apart from other important reasons (XUL), look at the gecko version too. The current KM 1.5.4 has gecko 1.8.x, and only KM 1.6 will have gecko 1.9.x, but so far KM 1.6 is only available as alpha version, in the middle of development yet. No idea what influence on memory that has exactly, just know they say the new gecko is much faster.

Options: ReplyQuote
Re: How come KM consumes LESS memory than FF?
Posted by: Lux
Date: March 08, 2010 08:26PM

That's just because Firefox is mainly written in XUL. XUL is not optimized for one OS. That's why its performance is not as high as a native application that is specialized for one OS. KM can only run on Windows but FF can run on many kinds of platform, right? There is also this browser called "Camino" that is optimized for Mac OS X, which is faster than FF too.

Options: ReplyQuote
Re: How come KM consumes LESS memory than FF?
Posted by: Lux
Date: March 08, 2010 08:39PM

Quote
siria
Just a note, apart from other important reasons (XUL), look at the gecko version too. The current KM 1.5.4 has gecko 1.8.x, and only KM 1.6 will have gecko 1.9.x, but so far KM 1.6 is only available as alpha version, in the middle of development yet. No idea what influence on memory that has exactly, just know they say the new gecko is much faster.
Sorry for two posts in a row.

Gecko 1.9.x has much better memory management. Mozilla people said they thoroughly killed memory leaks, so KM 1.6 is expected to have even less memory usage.

Options: ReplyQuote
Re: How come KM consumes LESS memory than FF?
Posted by: panzer
Date: March 09, 2010 02:31AM

Disrupted said that unless FF gets rid of XUL, memory leaks can't "be killed". Or so I understand his words.

Options: ReplyQuote
Re: How come KM consumes LESS memory than FF?
Posted by: penang
Date: March 09, 2010 06:06AM

Quote
Lux
That's just because Firefox is mainly written in XUL. XUL is not optimized for one OS. That's why its performance is not as high as a native application that is specialized for one OS. KM can only run on Windows but FF can run on many kinds of platform, right? There is also this browser called "Camino" that is optimized for Mac OS X, which is faster than FF too.
Thanks for the explanation !

I was very surprise when I ran those tests.

I did not expect that FF took so much more memory than KM.

I thought KM, using the same Gecko engine as FF, would use roughly equivalent amount of memory for same task, but I was wrong.

20% to 25% might be nothing, in this age of multi-gigabyte memory machine, but still, that's something KM has over FF.

Options: ReplyQuote
Re: How come KM consumes LESS memory than FF?
Posted by: guenter
Date: March 09, 2010 12:09PM

Quote
penang
KM uses the sme Gecko engine as FF, right?

I assume we speak about identical GRE version.

Yes & No, because unlike Firefox and the rest - K-Meleon only uses the components that are needed for browsing. After the GRE is build devs delete many files (59? - & not all modules are build). AFAIK Firefox, Thunderbird ... have the same basic GRE, that is they all have mail and browser components. Till FF 2 the dlls K-Meleon has in components were in the big exe & now they are in a big Xul.dll.


After the deleting of the files the GRE is slightly faster on tests.
I never checked the RAM before abd after. My guess less RAM is used.

K-Meleon chrome is also smaller. Smaller chrome gives faster start.
Chrome is loaded and stays AFAIK in RAM.

On current machines 20% more RAM do not matter unless other hungry apps also want RAM smiling smiley



Edited 1 time(s). Last edit at 03/09/2010 12:13PM by guenter.

Options: ReplyQuote
Re: How come KM consumes LESS memory than FF?
Posted by: snuz2
Date: March 17, 2010 03:22PM

Another even simpler reason is the size of the memory cache. FF default may be higher. Although I would expect more of a constant difference with multiple tabs rather than the ratio he seems to report. Still, a tab doesn't necessarily eat a lot of resources and memory. Also, how customized is that FF? Any extensions? Extensions aren't under mozilla control and could be real memory hogs.

well, as Guenter points out, unless you are running W9x like me, who cares how much memory is being used...

Options: ReplyQuote
Re: How come KM consumes LESS memory than FF?
Posted by: JohnHell
Date: March 17, 2010 10:39PM

Quote
snuz2
well, as Guenter points out, unless you are running W9x like me, who cares how much memory is being used...
Me and every one who expects to use the memory when it's needed, not to waste it when is not needed.

I don't feel things going good when you have an app. using 20MB when, better done, it could use only 5MB.

Nothing against who likes to see how their memory is wasted in nonsense use.

Options: ReplyQuote
Re: How come KM consumes LESS memory than FF?
Posted by: ndebord
Date: March 18, 2010 06:13AM

Quote
guenter
Quote
penang
KM uses the sme Gecko engine as FF, right?

I assume we speak about identical GRE version.

Yes & No, because unlike Firefox and the rest - K-Meleon only uses the components that are needed for browsing. After the GRE is build devs delete many files (59? - & not all modules are build). AFAIK Firefox, Thunderbird ... have the same basic GRE, that is they all have mail and browser components. Till FF 2 the dlls K-Meleon has in components were in the big exe & now they are in a big Xul.dll.


After the deleting of the files the GRE is slightly faster on tests.
I never checked the RAM before abd after. My guess less RAM is used.

K-Meleon chrome is also smaller. Smaller chrome gives faster start.
Chrome is loaded and stays AFAIK in RAM.

On current machines 20% more RAM do not matter unless other hungry apps also want RAM smiling smiley

Guenter,

I never used to check memory usage, but have ever since I moved to a ramdrive for the disk cache instead of the hard drive. Compared to FF 3.5.8, KM 1.5.4 consistently uses 5 to 8 megs more. That difference is explained by the difference in the Gecko engines (KM Gecko 1.8 vs FF Gecko 1.9).

I allocated 8 megs to memory and 8 megs to the ramdrive (aka substitute for hard drive cache). As the hard drive cache is now measurable, I use the Privacy Bar cache toggle to measure changes. Process Explorer shows that around 6 megs is cleared from KM's usage whenever I click on that toggle.

As for speed differences between FF 3.5.8 (Gecko 1.9xx) and KM 3.5.4 (Geko 1.8.xx), KM, despite using an older Gecko, has consistently run faster to my subjective eye. Loading time seems similar though. However, KM 1.5.4 with the ram (disk) cache runs much faster than without, which means in my case, my older Pentium M machine is slow and that shows up in slower operation IF or WHEN I use a hard drive disk cache.

Can't speak to what happens with KM 1.6 alpha, as I've not yet played with that version. Alphas are something I play with when I have the time and these days I don't have any to spare there. Perhaps when we get to the Betas!

N



Edited 4 time(s). Last edit at 03/18/2010 06:17AM by ndebord.

Options: ReplyQuote
Re: How come KM consumes LESS memory than FF?
Posted by: 4td8s
Date: March 23, 2010 12:42AM

Quote
snuz2
Another even simpler reason is the size of the memory cache. FF default may be higher. Although I would expect more of a constant difference with multiple tabs rather than the ratio he seems to report. Still, a tab doesn't necessarily eat a lot of resources and memory. Also, how customized is that FF? Any extensions? Extensions aren't under mozilla control and could be real memory hogs.

now you see why I use "browser.cache.memory.capacity" in FF and SM and use a certain "limit" on RAM cache with those browsers. even Netscape versions 8.x & 9.x use that value.

Quote
ndebord
Can't speak to what happens with KM 1.6 alpha, as I've not yet played with that version. Alphas are something I play with when I have the time and these days I don't have any to spare there. Perhaps when we get to the Betas!

I can say that the latest KM 1.6 alpha I've tested is as fast as KM 1.5.4. Just need to change the "user agent" strings of FF/SM to more "modern" versions as I had suggested here for KM 1.6.



Edited 1 time(s). Last edit at 03/23/2010 12:45AM by 4td8s.

Options: ReplyQuote
Re: How come KM consumes LESS memory than FF?
Posted by: passer
Date: February 21, 2012 12:57AM

FF has improved, but it still leaks 100s of megabytes of memory -every few hours! Mozilla seem content for the leak to be hidden by our paging systems, but on old laptops and netbooks this means stalling, heating and reduced battery time as the harddrive gets thrashed for paging.

KM is a big relief on old laptops and netbooks. Im using community recommended 1.6.0db, with a small ramdrive for cache, and ive seen no crashes, running for days with dozens of changing tabs, WS or private bytes haven't gone over 200MB and go back down to 100-150 after tabs are tidied up. FF10 / Seamonkey will choke my netbook (400+ MBs) if left open for more than a few hours. Chrome an IE will choke it if too many tabs are opened. Safari has some weird cache thrashing bug, KM just runs happily for ever on 100 - 200 MBs.

Thankyou KM developers!

Options: ReplyQuote
Re: How come KM consumes LESS memory than FF?
Posted by: rodocop
Date: February 21, 2012 08:15PM

One remarkable thing about KM is that if you open about 20 tabs there and it eats up about 150-200Mb of RAM, than try to leave it intact for some time - you'll see that RAM consumption decreases significantly!


Try K-Meleon-1.6db+NS by dugbug // KM-16-S2014 by Fred // 1.6beta2.6 by JamesD

K-Meleon Twin+ Download for modern browsers =//= Download for old ones =//= Discuss it!!!

New KM74 for test and feedback! Get it there!


Options: ReplyQuote


K-Meleon forum is powered by Phorum.