Chrome and Firefox developing new ways to reduce memory usage

New web tools and a RAM diet for Firefox could reduce memory usage

Google Chrome and Firefox app icons

Internet users rejoice: Google and Mozilla are working to reduce how much memory websites hog on your computer.

Both companies introduced potential fixes for their respective browsers.

Google added a new feature called the Page Lifecycle API to Chrome in version 68. The feature will help browsers pause websites easier. Additionally, it will help browsers reallocate system resources. Most importantly, the feature also makes it easier for browsers to start webpages up again when you need them.

Page Lifecycle attempts to standardize the web by creating universal lifecycle states. These states allow browsers and webpages to work together so that system resources can be managed appropriately without affecting webpage or browser performance.

However, the API requires web developers to build support into their webpages to work effectively. In the long term, this may prove a significant change, not just for Chrome but for browsers as a whole. However, it will take time for developers to support it.

Even worse, some older websites may never support it.

Reducing overall memory usage

Firefox has a solution as well, but it’s specific to Firefox. Dubbed ‘Fission MemShrink,’ the project seeks to shave 7MB off of each of Firefox’s content processes the browser uses to render a webpage. A process is an instance of a program being executed.

The project belongs to a broader Fission program hoping to make webpages feel faster.

MemShrink however isn’t entirely about reducing memory usage. MemShrink is an offshoot of Firefox’s work to implement site isolation to the browser. Chrome implemented this earlier in July as a safeguard against attacks like Meltdown and Spectre. However, site isolation increases the number of processes used by the browser. More processes result in additional memory usage.

MemShrink’s goal is to get every process Firefox runs to 10MB of data or less. Since a single session of Firefox requires at least 100 processes, that would put memory usage at about 1GB instead of 2 to 3.5GB we see now.

According to a newsletter from Mozillian Kris Maglione, that means cutting every process by at least 7MB. The newsletter breaks down just how monumental a task this is — monumental, but not impossible. Maglione also wrote that in “the past month, unique memory per process has dropped 3-4MB and [Java Script] memory usage in particular has dropped 1.1-1.9MB.”

Over 100 processes, that kind of reduction in memory usage certainly adds up.

Ultimately, both fixes will lead to better resource management when using a browser. Firefox’s solution will certainly provide Firfox users a snappier, more secure browser. That said, Chrome’s Page Lifecycle API will have deeper effects in the long term.

Source: Google Developers, Mozilla Via: CNET