Goodbye RAM :) Or better for RAM, since I can now selectively kill and resume processes?
Oh, I see it's not one process per tab. So does anyone know how I can more easily survive on 2GB with many tabs, other than by constantly killing processes?
My strategy is to periodically close Firefox and reopen it, to "hibernate" the tabs I'm not currently using.
Between lazy tab restore and Chrome's process per tab memory overhead, Firefox is currently waaay better than Chrome for those of us coping with RAM Deficit Disorder and O(e^x) tab syndrome; I hope when the Fox gets process-per-tab they don't close that gap.
The problem is this: Chrome. Which, last time I checked, often ends up with >100MB private working set per tab.
And given the amount of dev time that's gone into Chrome / Chromium, it doesn't exactly set a good precedent.
Also, you're missing that there are a number of things that have to be duplicated in a multiprocess model that you only need one of in a multithreaded model. For instance: the JS heap, which has a reasonable amount of overhead.
Some things can be shared between processes like they can be between threads, but not everything.
Based on running the following script on a freshly generated about:memory profile:
var max = 0;
var sum = 0;
var vals = $$('span[id^="Web Content"][id$="explicit"] span.mrValue');
for (let vi = 0; vi < vals.length; vi++) {
let v = parseFloat(vals[vi].textContent);
sum += v;
max = Math.max(max, v);
}
console.log('Content processes:', vals.length);
console.log('Sum:', sum);
console.log('Max:', max);
console.log('Average:', sum/vals.length);
This is with ~400 tabs opened but in "unloaded" state. Only 5 pages were actually fully loaded.
50 processes caused stuttering when scrolling in the tab bar.
10 & 5 processes felt smooth and allowed tab titles of background tabs to load in quickly during startup.
1 process took forever to actually load in the tab titles of background tabs on startup.
Compartments are not quite what I'm talking about.
I'm more talking about metadata / caches. There's a fair bit of stuff that can be global with a single process that cannot be with multiple processes. Sometimes you can use shared memory tricks, but not always.
Also: I wasn't aware there was that much of a memory penalty. Yow.
I think I'd rather have multiprocess Firefox, even if I have to be a bit more judicious with my tab usage. I don't really know if having 40 tabs open is useful for me, or if it just makes me scatterbrained.
Doing any kind of web research for work is effectively a breadth-first tree traversal. Remembering all the higher level nodes, when you're ready to go the next level deep, would be a nightmare. My brain couldn't handle that, but tabs solve it effortlessly.
So I'd say that I keep many tabs open for the exact opposite reason. It enhances what I can do, due to the limitations of my brain.
Within a few decades, I expect for the concept of open tabs and bookmarks to merge. We'll be keeping far more tabs open, and flipping between them effortlessly, or scrolling back to that snapshot in time effortlessly.
I imagine closing tabs will be being like closing Emacs buffers. In practice, you practically never have the need to close an Emacs buffer, for anything you might have a small chance of wanting to work on again soon.
Oh, I see it's not one process per tab. So does anyone know how I can more easily survive on 2GB with many tabs, other than by constantly killing processes?