Thursday, April 19, 2007

Helping where it hurts: Firefox's gargantuan appetitie for WIndows memory

I nearly fell over one time when I saw firefox.exe had managed to allocate 850M for itself...it's not like I had 100 tabs open - not even close. Now a web browser is a very very complex app and for rendering HTML and images and interpreting JavaScript and hosting a Java VM and plugins like Flash and RSS and ...well I don't expect Firefox to not be the most memory-intensive app on Windows...but within reason dude.

The thing that helped me the most is setting the preference config.trim_on_minimize = true as described here: http://kb.mozillazine.org/Config.trim_on_minimize By default it's false and apparently this prevents Windows from swapping out FF memory when it's minimised - not generally a good thing when you have complex pages and lots of tabs. According to this earlier generations of FF circa 2001 had serious performance problems when memory got swapped out, but on newer PC's with > 512MB RAM this should no longer be an issue.

The effect of this can be quite dramatic; my FF mem usage went from ~600M to ~200M under heavy usage. There are a lot of pages devoted to optimizing FF mem usage; just Google for it, but if FF seems to be allocating a huge amount of memory and not releasing it even after you close down all the tabs, give this a try first.

No comments:

Post a Comment