Live data from Hacker News

Electrolysis – run web content in a separate process from Firefox

wiki.mozilla.org

81–90 of 107 posts

Re: Electrolysis – run web content in a separate process from Firefox

#81
post #2

I tried it myself. Most of the bugs that are there explained in that wiki page aren't really occurring (I guess they were fixed in the meantime), but I noticed creating and destroying new tabs was much much slower, and that made me disable it.

e10s engineer here. There are certainly some performance things to iron out. Right now, we're just trying to make the base browser functions work properly, and then we'll start tackling the performance problems.

I know ;)

I'm looking forward to Electrolysis, since having only one process is what makes me use Chrome: the renderer hangs a lot, especially with complex pages (such as TweetDeck for me), and when that happens, the whole browser hangs.

Re: Electrolysis – run web content in a separate process from Firefox

#82
post #31

Is there a "Ctrl+tab" extension that works properly with this?

There is an undocumented about:config pref "browser.ctrlTab.previews" that enables a tab preview switcher. The switcher works with e10s, but not the tab previews. You can watch e10s bug 863512 for more info:

https://bugzilla.mozilla.org/show_bug.cgi?id=863512

Re: Electrolysis – run web content in a separate process from Firefox

#83
post #34
post #33

Earlier quoted context omitted.

Would it have the same problem with a multiprocess Firefox?

It may be worse, the problem is that it loads too many info per tab. If you do it on multiple processes it will not get any better.

Multiprocess Firefox currently only uses one process for all tabs (plus a browser UI process). The tab process will be sandboxed, so users will get some of the security benefits of multiple tabs without the memory overhead of tab-per-process.

If you want to experiment with more than one tab process, you can tweak the about:config pref "dom.ipc.processCount".

Re: Electrolysis – run web content in a separate process from Firefox

#84
post #79

Earlier quoted context omitted.

Sure, tabs can load static assets from a read-only cache instead of re-fetching everything from the origin (be it an in-browser cache run by the browser kernel, or a Web cache somewhere between you and the origin). But surely, the tabs run private instances of the layout engine and javascript VM when they process the page, no? When would it ever make sense for multiple tabs to directly access each other's runtime sta…

> But surely, the tabs run private instances of the layout engine and javascript VM when they process the page, no? No. For example, you can get direct access to another tab's "window" object in this way, as long as it's same-origin: https://developer.mozilla.org/en-US/docs/Web/API/window.open... > When would it ever make sense for multiple tabs to directly access each other's runtime state? For Web compatibility.

I'm not sure that your example prevents the implementation of per-tab javascript VMs. Wouldn't the browser be designed such that its kernel mediated all tab-to-tab runtime state queries? Then, tabs wouldn't directly access each other's state, and the kernel would interpose security policies (such as same-origin-only requests) between tabs regardless of a tab's behavior. To keep this arrangement transparent to programmers, the tab's javascript VM would map access to shared state (like a window's opener) onto the appropriate call to the kernel, obviating the need for direct inter-tab memory access while preserving compatibility.

Re: Electrolysis – run web content in a separate process from Firefox

#85
post #63

Earlier quoted context omitted.

The amount of memory that gets paged in went up, but the whole point is that you never have to page any of the current tab's memory while you're using it, unlike with the monolithic 1 GB Firefox process today. I feel like I must not have been clear earlier because I have made just a single point, and both of you are discussing things not related to that point. Let me try one more time: it's all about performance of t…

Right, and the counter point is that this should not help there. If the other tabs are idle, than they are idle whether in process or not. If they are all cpu bound doing stuff, then your machine is again in trouble, current process or not. If they are all constantly thrashing in resources, you are still in trouble. Why would you think the current monolithic would page out a tab that was actively being used? Why woul…

Because the tab you're using has barfed its data all over the heap, so you can't keep all its data paged into main memory. Its data is mixed together with the other tabs' data.

Re: Electrolysis – run web content in a separate process from Firefox

#86

Earlier quoted context omitted.

The amount of memory that gets paged in went up, but the whole point is that you never have to page any of the current tab's memory while you're using it, unlike with the monolithic 1 GB Firefox process today. I feel like I must not have been clear earlier because I have made just a single point, and both of you are discussing things not related to that point. Let me try one more time: it's all about performance of t…

I still don't see the scenario you're describing, though. Let's say you have two tabs open, A and B. Then some set of pages will have memory for A, and some set will have memory for B. If you're not using A, then the operating system will notice that those pages have not been used in a while and if under memory pressure it will page them out. This won't affect pages with memory for B. The only issue would be if most…

You get it. The one thing you're missing is that application-aware allocation is hard and something that Firefox engineers continuously have to work on (http://blog.pavlov.net/2007/11/10/memory-fragmentation/), even as they add new features and performance caches. The electrolysis/chromium solution makes the problem disappear entirely (along with some security problems) without any possibility of regression.

Re: Electrolysis – run web content in a separate process from Firefox

#87
post #63

Earlier quoted context omitted.

Right, and the counter point is that this should not help there. If the other tabs are idle, than they are idle whether in process or not. If they are all cpu bound doing stuff, then your machine is again in trouble, current process or not. If they are all constantly thrashing in resources, you are still in trouble. Why would you think the current monolithic would page out a tab that was actively being used? Why woul…

Because the tab you're using has barfed its data all over the heap, so you can't keep all its data paged into main memory. Its data is mixed together with the other tabs' data.

At face value, I don't see why this should necessarily be the case. That is, why would a tab "barf its data all over the heap?" More directly, why couldn't, as the sibling said, this have been addressed with a different allocation mechanism.

I'm assuming this has come up a fair bit. Any good links to read up on this?

Re: Electrolysis – run web content in a separate process from Firefox

#88
I got the option to enable this the last time my Nightly installation was updated. It's been working well so far, but plugins are leaving a lot to be desired. On OS X Yosemite, full screen flash video will make the entire browser crash with the tab. On OS X Mavericks, it looks like the native Firefox PDF viewer is no longer available, and the adobe plugin was not working at all in its place.

I'm excited about e10s though, I think this is definitely the right way to go for all browsers!

Re: Electrolysis – run web content in a separate process from Firefox

#89
WARNING! If you run Firefox Nightly to test Electrolysis (e10s), you should not share your e10s-enabled user profile with other Firefox release channels: Aurora, Beta, or Release! The Nightly channel has many e10s bug fixes that are not fixed in Aurora, Beta, or Release.

Re: Electrolysis – run web content in a separate process from Firefox

#90

Earlier quoted context omitted.

I have 16GB of ram in my machine, I'd rather use 4 of that for a responsive browser than 1.5 for something that is constantly locking up with more than a few tabs. FF might be better for older, low end machines but now a days low end machines are shipping with 4GB and modest machines will have 8.

In my main rig, I have 8 currently, and would need to replace it all to upgrade (4x 2GB DIMMs) and presently can't afford to build a new one for at least a few months. I do not want a browser to waste 4GB where it would be 1 with all the bloat stripped out.

Whilst you're browsing what are you using the other 7GB for?
Post reply on HN