Monday, February 26, 2007

Want to reduce Firefox Memory Consumption?

Firefox seems to need more memory when I have it open for a long time and surf to many different websites. I was never able to find out why it behaved this way and assumed that it was either a memory leak or an extension which would be responsible for this behavior.

It seems that my assumption was wrong. Firefox saves the last 50 visited websites of a single session in memory which means that it could add up quickly if you visit lots of content filled websites. The reason behind this is that it is faster to access a already visited website if it still resides in memory instead of loading it from disk cache or from the server.

50 sites on the other hand seems a lot to me. I usually do not visit sites again that I visited a while ago - I tend to visit many different sites and only a few ones more than once daily. The fix is relatively simple. Type about:config in the Firefox address bar and search for the term:

browser.sessionhistory.max_entries

Right-click the entry, select modify from the list and change it to a lower value. I set it to 5 which works well for my surfing habits. Other values might be better for yours.

0 comments: