Mozilla Firefox has never been good with system memory consumption, the free open-source web-browser is a very well-known memory guzzler thanks to various memory leaks in it's codebase. There have been various un-official solutions to the problem and addons like RamBack do help make things in-control a bit, but nothing works as a concrete solution to the problem which is needed to face-off today's tough competition.
Mozilla developers have now decided to finally address the issue seriously and a dedicated team called MemShrink is now in-operation to tackle the issue.
MemShrink is a project that aims to reduce Firefox's memory consumption. There are three potential benefits:
- Speed: less cache pressure, and less paging. The latter is crucial, as it can destroy performance.
- Stability: fewer OOMs, whether due to address space exhaustion or otherwise. This results in fewer crashes (due to mishandling of OOM) or aborts.
- Perception: fewer people will complain about Firefox being a memory hog.
These factors are doubly important for Firefox Mobile.
There are two main facets to this:
- "Slimmer" memory usage, e.g. more space-efficient data structures.
- Avoiding "leaks". This loose use of the term (which is used throughout this document) includes:
- True leaks, where memory is lost forever.
- Lifetime issues, where memory is not reclaimed until you close the page/tab/window/process.
- Collection heuristic issues (e.g. GC is too infrequent in certain cases).
- Bad cache algorithms and poorly tuned caches.
Leaks are generally more important, as they are more likely to lead to horrible performance.