Live data from Hacker News

Multiprocess Firefox

developer.mozilla.org

91–100 of 171 posts

Re: Multiprocess Firefox

#91
post #51

Earlier quoted context omitted.

Multiple processes does not necessarily mean increased memory usage. I'm a little surprised at how many misinformed comments there are like this.

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 r…

As far as I understand it, Firefox already have separate JS heaps since a few years back via the compartments model¹.

1: https://blog.mozilla.org/nnethercote/category/compartments/

Edit:

A quick, 100% scientific™ test:

  Content processes: 50
      Sum: 1858.6
      Max:   42.72
  Average:   37.172

  Content processes: 10
      Sum: 791.96
      Max:  88.96
  Average:  79.196

  Content processes: 5
      Sum: 624.1100000000001
      Max: 137.68
  Average: 124.82200000000003

  Content processes: 1
      Sum: 453.89
      Max: 453.89
  Average: 453.89
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 
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.

Setting changed via: about:config?filter=dom.ipc.processCount

Re: Multiprocess Firefox

#92
post #42

Please please test battery life impact while implementing the Multi-process stuff. I had to move away from Chrome just on the battery life issue. I suspect (but cannot conclusively prove) that the multi-process crap that Chrome has just drains your battery much faster. And yes I am perfectly aware of the supposed fix in Chrome for the battery killing bug.

There's no inherent reason why multiprocess would have a significant impact on energy, it just adds a relatively small amount of extra context switching and marshalling to what is already a huge pile of the same (your desktop OS). When the system is idle, or a page is rendered, the difference shouldn't be measurable.

I assume all graphics data is sent from the tab sub-processes to the main process (Chrome and similar in IE9-11). Multiprocess is different in Firefox, to get full multiprocess (per tab) we maybe have to wait a bit longer, for a Servo based browser.

Launching processes is a bit expensive especially on WinNT series (up to Win10), but ultimately it's the way to go ("sandbox" = sub-processes with minimum permissions) - even Servo with its Rust language use it as certain parts like the JavaScript engine are still C/C++ based (come from Firefox/gecko) for the near future and can crash.

Re: Multiprocess Firefox

#93
post #73

Earlier quoted context omitted.

> The way I use Firefox is that having 50 or more tabs open is normal for me I've never understood this. Isn't that what bookmarks are for?

I currently have 2014 tabs in my session (almost all unloaded, using around 2GB of ram that I wouldn't use otherwise). I had 1600 tabs a few days ago. They are links I clicked on in other apps or browsed to over the past few months. When I get a chance to plow through a few dozen/hundred of these tabs I can read/view them and close them very quickly. Notice all the UI stuff I don't have to do: I never had to perform…

Wh-whoa . . . I think you just set some sort of a record over there.

Re: Multiprocess Firefox

#94
post #73

Earlier quoted context omitted.

> The way I use Firefox is that having 50 or more tabs open is normal for me I've never understood this. Isn't that what bookmarks are for?

I currently have 2014 tabs in my session (almost all unloaded, using around 2GB of ram that I wouldn't use otherwise). I had 1600 tabs a few days ago. They are links I clicked on in other apps or browsed to over the past few months. When I get a chance to plow through a few dozen/hundred of these tabs I can read/view them and close them very quickly. Notice all the UI stuff I don't have to do: I never had to perform…

In terms of UI stuff, how do you find a tab among a thousand?

When the tab page title shrinks and all I see is favicon, I feel lost.

Re: Multiprocess Firefox

#95
post #17

In between e10s, Servo, and the new developer theme in the current Nightly, I feel like Firefox is finally starting to become more competitive to other browsers again. I switched to Chrome because it seemed like Firefox was becoming more and more dated in comparison, both in terms of technology and UI. I still have some gripes with Firefox at the moment, but I'm beginning to seriously consider switching back. This is…

The chrome dev tools are way better than in Firefox. It was a reluctant change for me, but my productivity in chrome is way higher.

Re: Multiprocess Firefox

#96
post #71

From the experience I've had with Chrome, I would say that process per tab is overhead. Sure, there are some benefits from having a few processes that are managing different parts of the system, but not hundreds of processes just for browsing. The way I use Firefox is that having 50 or more tabs open is normal for me, sometimes there are even hundreds of them. Currently Firefox works great and although there are some…

"There are multiple competing factors when it comes to choosing the right number of processes.

- For security, more processes is better; one per tab is probably ideal.

- For crash protection, ditto.

- For responsiveness, one process per CPU core is probably best.

- For memory usage, one process is probably best."

as a dev wrote in the mailing list: https://groups.google.com/forum/#!topic/mozilla.dev.platform...

For various technical reasons Firefox e10 will support a few sub-processes in near future, but nothing is set in stone. Rust based Servo supports (afaik) dozens of processes, as we know it from Chrome and IE.

Re: Multiprocess Firefox

#98
post #94

Earlier quoted context omitted.

I currently have 2014 tabs in my session (almost all unloaded, using around 2GB of ram that I wouldn't use otherwise). I had 1600 tabs a few days ago. They are links I clicked on in other apps or browsed to over the past few months. When I get a chance to plow through a few dozen/hundred of these tabs I can read/view them and close them very quickly. Notice all the UI stuff I don't have to do: I never had to perform…

In terms of UI stuff, how do you find a tab among a thousand? When the tab page title shrinks and all I see is favicon, I feel lost.

You can of course search open tabs from the address bar. But at least my workflow is to browse through the old tabs and read / close one by one.

Also in Firefox the tabs never shrink to just favicon, the tab heads become a scrollable list. Much better than Chrome imo.

Re: Multiprocess Firefox

#99
post #73
post #71

From the experience I've had with Chrome, I would say that process per tab is overhead. Sure, there are some benefits from having a few processes that are managing different parts of the system, but not hundreds of processes just for browsing. The way I use Firefox is that having 50 or more tabs open is normal for me, sometimes there are even hundreds of them. Currently Firefox works great and although there are some…

> The way I use Firefox is that having 50 or more tabs open is normal for me I've never understood this. Isn't that what bookmarks are for?

It depends on what you do. Doing research requires a lot of resources (tabs) especially if you do it in an non-linear way. Consuming a content requires only on tab.

I open and use dozens of tabs (up to 100, then I bookmark all with one click and close all). But all tabs are active in memory in IE11 or Chrome so I can switch between them (sure I trade GBs of RAM for time, but that's okay). Firefox unloads tabs, so it reloads the page - that's better if you re-open Firefox as it only loads one tab instead of loading all tabs like in Chrome/IE but worse if you have it open and actually work in the browser. So for me it's a trade off, and I find it good I have a choice for different tasks I can choose the best way.

Re: Multiprocess Firefox

#100
post #94

Earlier quoted context omitted.

I currently have 2014 tabs in my session (almost all unloaded, using around 2GB of ram that I wouldn't use otherwise). I had 1600 tabs a few days ago. They are links I clicked on in other apps or browsed to over the past few months. When I get a chance to plow through a few dozen/hundred of these tabs I can read/view them and close them very quickly. Notice all the UI stuff I don't have to do: I never had to perform…

In terms of UI stuff, how do you find a tab among a thousand? When the tab page title shrinks and all I see is favicon, I feel lost.

I don't quite have that many tabs open but I find that grouping tabs into separate browser windows and taking advantage of your window manager goes a long way.
Post reply on HN