I have been using firefox browser for a while now. Although I never had any issue with this browser, I just hate it when it starts hogging on memory and eats up almost half of the RAM.
Following are few tweaks that you can perform on your firefox browser to reduce its memory usage.
1. Remove unnecessary Add-ons and Themes
One of the primary reasons of Firefox slowing down is due to large number of installed extensions. We are tempted to try out each and every fancy add-ons and these could slow down Firefox. Few things to take care while installing and using add-ons
- Uninstall all add-ons which are not used
- Install only the latest versions of add-on.
- Remove unnecessary scripts and themes.
You can also check Firefox memory usage by opening Firefox in safe mode by disabling all add-ons. To open in Safe mode, either you can select it from the programs menu or type
firefox -safe-mode in run command.
2. Clear Download History
Memory usage can increase and Firefox can slow down or hang if the download history is allowed to accumulate. Clear the download history (you may need to exit Firefox and delete the file “downloads.rdf” from the profile folder in some cases) and change this setting to circumvent the problem:
Tools -> Options -> Privacy -> Download History -> Remove Files from the Download Manager, select: “Upon successful download”.
3. Reduce memory usage when minimize
Firefox comes with an option by which we can configure Firefox to reduce its memory usage when it is minimize. Following is the procedure to configure firefox to release memory when minimized.
- Type in about:config in the address bar and hit Enter
- Right click and choose New > Boolean
- Type config.trim_on_minimize in the pop-up box and hit Enter
- Select True and hit Enter.
- Restart Firefox
4. Fixed cache capacity or Disable Cache Totally
Every time new page is loaded, Firefox will cache the page so it doesn’t need to load again to be redisplayed. By default, this setting is set to -1 for browser.cache.memory.capacity and to a number you specified in Tools -> Options -> Advanced -> Network / Cache for browser.cache.disk.capacity
To fix your cache to a certain value the browser.cache.memory.enable and browser.cache.disk.enable needs to be True for this to work
- Type about:config in the address bar and hit Enter
- Search for browser.cache.memory.capacity and set a number in KB to use for the memory cache (ie. 1024KB = 1MB)
- Search for browser.cache.disk.capacity and set a number in KB to use for the disk cache (ie. 1024KB = 1MB)
To Disable the cache Totally
Set both browser.cache.memory.capacity and browser.cache.disk.capacity to 0.
Alternatively, you can also set browser.cache.disk.enable and browser.cache.memory.enable to False.
5. Restarting Firefox
If you are using Firefox for long hours, then its advisable to restart Firefox periodically as Firefox memory usage increases when kept open for long hours. You can use the session restore feature in to bring back all the windows after restart.