[geeks] I love it when software gets more efficient

Charles Shannon Hendrix shannon at widomaker.com
Fri Sep 8 16:32:30 CDT 2006


Thu, 07 Sep 2006 @ 21:19 -0500, Phil Brutsche said:

> Charles Shannon Hendrix <shannon at widomaker.com> wrote:
> 
> > Today I checked Firefox and Thunderbird after they'd been running about
> > 10 hours.
> >
> > Firefox was using 220MB, and Thunderbird was using 280MB.
> 
> Sometime I'm lucky if it's that small after even 6 hours...
> 
> At times I have a 700MB Thundirbird process, and about 200MB for Firefox.
> 
> BTW, they *have* gotten better - 1.5 uses less memory than 1.0.  With  
> Thunderbird 1.0 I would see it taking up 900MB(!), and with Firefox  
> 1.0 I could get it up to 500MB.  With buggy JavaScript I've seen it up  
> to 1.5GB... real fun when the machine "only" has 1GB RAM.

I found a setting which might possibly help a bit.

Firefox has an incredibly *STUPID* and *BRAINDEAD* method of determining
how much memory to use.

It uses a windowed percentage of your main memory.

That's about the most stupid thing I can think of, because there is no
correlation between system memory and how much cache you really need.

Anyway, there are configuration options for this.  I have no idea how
well they work but some people say they help.

browser.cache.memory.capacity
browser.cache.memory.enable

The first setting determines how much memory can be used to cache chrome
UI elements and images.  It is only valid of the second one is true.
The default is for Firefox to determine itself how much to use.

On a 1GB system, the sliding scale allows Firefox to use as much as 64MB
just for chrome cache, and it has a tendency to not throw unused objects
away as well.

Worse, there are correlary data structures allocated with each object
which are not controlled by the bounds of memory cache.

In other words, if 1MB of objects is created, it might also cause
another N bytes of memory to be allocated as other overhead, so the raw
memory setting isn't necessarily telling you how much will get used.

I enabled this setting on my browser and set it to just 4MB, though some
people recommend 16MB.  It will take awhile for me to see if it helps or
not.

There is also a similar setting for disk cache:

browser.cache.disk.capacity
browser.cache.disk.enable

I've not messed with this yet.

Of course, all these optimizations really are just gaining a bit here
and there compared to the massive memory consumption the program has.

Like the other poster said, it is 2006 and we can't have a decent and
well written browser, but maybe we can tweak its runaway consumption at
least a little bit.



-- 
shannon "AT" widomaker.com -- ["All of us get lost in the darkness,
dreamers turn to look at the stars" -- Rush ]



More information about the geeks mailing list