e10s / Electrolysis

Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
User avatar
Antonius32
Add-ons Team
Add-ons Team
Posts: 695
Joined: 2014-05-25, 11:18
Location: Netherlands

e10s / Electrolysis

Unread post by Antonius32 » 2014-11-24, 20:28

I have been reading about this Firefox project called "e10s" (or "Electrolysis"), lately, and I was wondering:
  • What exactly are the advantages, if any, for regular users?
  • Will Pale Moon support/implement the e10s model in the future?

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35473
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: e10s / Electrolysis

Unread post by Moonchild » 2014-11-24, 20:33

Advantages for regular users are absolutely minimal. It is a multi-process setup for tabbed browsing. In fact, if you are a heavy tab user (the person with 2000+ tabs in a session comes to mind) then it will completely kill your usability of your computer, period.

Pale Moon will not implement e10s. I'd rather parallelize system libraries instead (like I already do for some things).
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
Antonius32
Add-ons Team
Add-ons Team
Posts: 695
Joined: 2014-05-25, 11:18
Location: Netherlands

Re: e10s / Electrolysis

Unread post by Antonius32 » 2014-11-24, 20:41

Thank you for explaining. I was asking, because on some forums, people seem to make a big deal of e10s, and I didn't understand why..

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35473
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: e10s / Electrolysis

Unread post by Moonchild » 2014-11-24, 21:09

Antonius32 wrote:Thank you for explaining. I was asking, because on some forums, people seem to make a big deal of e10s, and I didn't understand why..
It's the "latest shiney". That's why they make a big deal out of it :P
Honestly, haven't they learned anything from other browsers that try to do this and happily eat up all your computer's resources? :|

E10s in one implementation or another has been "half" in the tree for years. Pale Moon's source tree is riddled with a lot of e10s code that isn't actively used, but because of the many modules it's in, also not easy to clean up. :(
I'd rather not have it but it's not a trivial project to clean all that out.

EDIT: poking at nightly's e10s mode, it seems they shove all web content in one process (which doesn't solve much of anything and the process can still only talk to 1 core). Basically, what that means is you have one "main" process with the UI of the browser and one "web content" process with all tabs (currently running in plugin-container.exe). With 6 tabs loaded, the main process takes 200-220MB of memory, the web content process takes no less than 600MB of memory. Err.. yeah, about that almost a GB of memory usage for 6 tabs...
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

jangdonggun1234
Fanatic
Fanatic
Posts: 104
Joined: 2013-06-06, 01:29

Re: e10s / Electrolysis

Unread post by jangdonggun1234 » 2014-11-28, 07:40

I also 7000tabs but I dont think e10s is that neccessary. And bad news that e10s is not 1 process for UI 1 process for content, it is per process for content mean 1 site = 1 process and crap like Chrome, I even want the 1st than 2nd because I just kill content process to free my memory.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35473
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: e10s / Electrolysis

Unread post by Moonchild » 2014-11-28, 10:24

You wouldn't be able to run that many tabs in a "1 process per site". I don't think Firefox does this, looking at the way nightly currently works. If it does, then it'll become totally useless for anyone using more than a handful of concurrent tabs.
Just killing the content process might not work very well - you would lose all your tabs in one kill operation, while leaving the UI hanging without content to talk to. I don't see in what way that would ever be a better situation than just closing the entire browser.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

weamish

Re: e10s / Electrolysis

Unread post by weamish » 2015-09-20, 19:57

Moonchild wrote:Advantages for regular users are absolutely minimal. It is a multi-process setup for tabbed browsing. In fact, if you are a heavy tab user (the person with 2000+ tabs in a session comes to mind) then it will completely kill your usability of your computer, period.
Just started looking into this subject after being referred by a FF user. Ran your comments by him, here's his response (please note that I'm not endorsing any of this, would be happy to pass along your thoughts) -

"My experience with electrolysis has been the exact opposite - I see the benefits from a few tabs up to a huge number of tabs. It's a shame that the author of Pale Moon isn't planing on updating the base code he originally forked off of anymore to stay current with Mozilla updates, especially since Pale Moon touts security and the new features Mozilla is rolling out are security game changers: true tab process isolation, every tab sandboxed, signed extensions, etc"

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35473
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: e10s / Electrolysis

Unread post by Moonchild » 2015-09-21, 09:57

FF user wrote:"My experience with electrolysis has been the exact opposite - I see the benefits from a few tabs up to a huge number of tabs. It's a shame that the author of Pale Moon isn't planing on updating the base code he originally forked off of anymore to stay current with Mozilla updates, especially since Pale Moon touts security and the new features Mozilla is rolling out are security game changers: true tab process isolation, every tab sandboxed, signed extensions, etc"
So in what way isn't this just rehashing the same (fallacy-riddled) desires of an FF-supporter who approaches everything as "FF is better" without taking a step back and looking at the big picture?

Re-basing Pale Moon at this point in time would simply kill the fork. There already is a Firefox; there's no need to have yet another Firefox to add to the pile of clones.
We are also staying current with Mozilla updates, but only those that matter, like security fixes and known stability issues. We are, however, a fork, which means there will be increasing differences and using FF as a deterministic reference you'll always find any fork inferior. If I were to use Pale Moon as a deterministic reference, FF would be inferior.

In what way is true tab process isolation more secure? Are they afraid that one tab is going to access another tab? Obviously not very well-versed in how Pale Moon works then ;)
Have they actually run a huge number of tabs with the intended "process-per-tab" setup? Because the currently-used "e10s" in Nightly is actually not doing that (and as such doesn't use tab process isolation) but instead has a content process running all tabs (in plugin-container.exe currently, not sure if they want to change that sometime). This doesn't really solve anything and is most definitely not a security game changer.
Sandboxed tabs? Not needed if you sandbox the content - which we do. This is why each document/page is in a sandboxed container inside the process.
Signed extensions? Apart from binding yourself to a vendor's distributor's arbitrary signing procedure this does absolutely nothing.
etc.? Please let me know what "etc." there is supposed to be, since all of it so far is N/A :)

Then, you can look at Mozilla's implementation. Nightly happily eats up half a GB main memory (not counting the 250MB GPU memory on top) in the main process for me when I open an average amount of tabs (15 or so). Mind you, that main process is only supposed to be the UI and shell management, since all the web content is running in the container process (@225 MB). Where does that all go?
(The same session in FF-release without e10s uses up ~400MB total (and 85-100MB GPU memory), in comparison (to 725MB/250MB), and similar (450MB/85-100MB) in nightly with e10s off - I'd say something is quite wrong there)
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

Tharn

Re: e10s / Electrolysis

Unread post by Tharn » 2015-09-21, 10:11

Three big theoretical advantages to 'real' per-process tabs would be 1) smoothness of the UI remains guaranteed, 2) smoothness in thread-limited situations remains guaranteed, as long as there's enough processing power available and 3) virtually all memory being claimed by a tab will be released when the tab is closed.

e10s as far as I understand doesn't really do this properly. Chrome / Chromium does it properly and it works rather well. Yes, a high number of tabs will eat more memory so it's not feasible for 'messy' browsing habits. I wouldn't think it a good idea to adopt e10s. Firefox is trying too hard to 'pivot' but at the same time, it'll never be as good as what it wants to be - Chrome.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35473
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: e10s / Electrolysis

Unread post by Moonchild » 2015-09-21, 10:32

Four big practical disadvantages of 'real' per-tab processes would be 1) limitation of concurrency, as each tab will load the OS task scheduler with a massive overhead, reducing smoothness not only in the browser, but for the entire system 2) hardware contention, since a video card will not take kindly to too many HWA applications using it at once 3) memory overhead per tab is ridiculous. Load a new copy of the parser and renderer for a 1k HTML document and 4) additional load on the OS for inter-process communication required for the UI and tab content to interact with each other.

So, there's definitely not all that much that that has going for it either, even despite Mozilla's weird attempt at implementing it that has none of your stated advantages.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

Tharn

Re: e10s / Electrolysis

Unread post by Tharn » 2015-09-21, 10:55

I concede the memory overhead, but I said as much in my post. For the other points.. calling those disadvantages 'practical' is a bit of a tall order. I've never noticed any issues with smoothness of operation for OS, browser or programs running in parallel for Chromium, while I have noticed all of the advantages I laid out. Chromium UI is always snappy, 'classic' Firefox UI chokes on a single heavy website. Maybe it comes into play when using many windows and dozens or hundreds of tabs at once; I just don't browse like that. Can someone else chime in here?

dark_moon

Re: e10s / Electrolysis

Unread post by dark_moon » 2015-09-21, 11:26

I fully agree with Moonchild.
We don't need a browser which slow down the browser and the whole system, without any real improvement.

e10s/ Electrolysis is Australis under the hood - a big fail.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35473
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: e10s / Electrolysis

Unread post by Moonchild » 2015-09-21, 11:35

Tharn wrote:I concede the memory overhead, but I said as much in my post. For the other points.. calling those disadvantages 'practical' is a bit of a tall order. I've never noticed any issues with smoothness of operation for OS, browser or programs running in parallel for Chromium, while I have noticed all of the advantages I laid out. Chromium UI is always snappy, 'classic' Firefox UI chokes on a single heavy website. Maybe it comes into play when using many windows and dozens or hundreds of tabs at once; I just don't browse like that. Can someone else chime in here?
I call them practical for a reason, because I've seen the effects in practice. Others are free to post their thoughts on this as well from their experiences, of course, but for me my system (everything in it) became sluggish as a result of Chrome's multi-process overhead when I crossed the 25-30 mark. And honestly, I'd rather have one app's UI be a little sluggish when a site misbehaves than everything including my work in other applications becoming impacted because it's off-loaded to the task scheduler of the OS.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

Axiomatic

Re: e10s / Electrolysis

Unread post by Axiomatic » 2015-09-21, 16:29

I browse with a large number of tabs. Electrolysis, does not really effect my browsing much when I tested. However there is the annoyance it takes away a lot of my precious CPU cycles (which in the end lags itself, and my other applications). Memory wise I do not have much of a problem, albeit Firefox runs heavier on memory than Pale Moon, I can live with that.
Tharn wrote:Chromium UI is always snappy, 'classic' Firefox UI chokes on a single heavy website.
More tabs, and extensions = Less smoothness. This is due to less resources available to allocate, because multi-processes gobbling up resources.

Electrolysis does not really help smoothness (I mean if that was the goal, it is biting the hand that feeds it), asynchronous code execution does help though. The point I have seen for electrolysis so that JavaScript will not hang the UI.

New Tobin Paradigm

Re: e10s / Electrolysis

Unread post by New Tobin Paradigm » 2015-09-21, 20:06

Perhaps if this is all about Javascript hanging the UI.. perhaps it should be looked at on a javascript basis.. Everyone looking at site coding more than browser coding.. MOST javascript that gets loaded in the form of huge libs need not happen because a site typically will use one or two things from such a massive lib.. IF there was less copypasta of includes of huge monolithic javascript libs and Sites were to just use ONLY what is necessary to accomplish a task then there would be less JS being downloaded and processed and less impact on the full browser.. LEADING to this becoming a non-issue..

SOMETIMES working with-in restrictions can spawn unique and innovative solutions that otherwise would never be considered and actually results in a focused and superior end product.

megaman

Re: e10s / Electrolysis

Unread post by megaman » 2015-09-21, 20:49

Matt A Tobin wrote:Perhaps if this is all about Javascript hanging the UI.. perhaps it should be looked at on a javascript basis.. Everyone looking at site coding more than browser coding
I'm still hoping that performance can keep improving from the browser's end, even if it's limited by the site's coding.
Moving forward and improving are key aspects to me, but I don't speak for everyone. And the Majority just wants the browser to work, not all of these fancy advances that make it better.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35473
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: e10s / Electrolysis

Unread post by Moonchild » 2015-09-21, 21:11

Well, JS enhancement are being made for Goanna as well (yes even for the benchmarking-focused people as a side effect). But Tobin does have a point that loading a massive blob of JS for e.g. a poster frame for a video is... insanity, really.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

megaman

Re: e10s / Electrolysis

Unread post by megaman » 2015-09-21, 23:31

Moonchild wrote:Well, JS enhancement are being made for Goanna as well (yes even for the benchmarking-focused people as a side effect). But Tobin does have a point that loading a massive blob of JS for e.g. a poster frame for a video is... insanity, really.
Are we talking PGO's as well?

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35473
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: e10s / Electrolysis

Unread post by Moonchild » 2015-09-21, 23:34

PGO? No. Way too risky for as large of a program with likely detrimental effects. No, we're talking pure code-side optimizations.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

weamish

Re: e10s / Electrolysis

Unread post by weamish » 2015-09-21, 23:59

Another response from my friend the FF user (much of this stuff is technically way beyond my pay grade, hope it adds something to the discussion) -

Signing and sandboxing is pretty much de facto for all web and mobile apps, and now all browser plugins for both Chrome and Mozilla, but the PM author seems confident that PM has achieved security without implementing those. I don't know enough about his implementation to judge one way or another.

Since Chrome and Firefox are both implementing tab isolation and sandboxing, and neither has the problems he describes, I think it is safe to assume that their respective engineers wouldn't move forward with those solutions if they were fundamentally broken and didn't offer significant advantages to those browsers. These changes have been a lot of work to implement, and I don't see why they would have dedicated the resources to reworking the core of their browsers if they didn't feel it to be well worth the investment. Why would the entire rest of the industry be moving in a direction that didn't offer any advantages AND made things worse - something doesn't sit right with that idea.

All I know is that since those changes in both browsers, I can load as many tabs as I want without issue, a problematic tab doesn't slow or crash any of the other tabs, and resource usage has gone way down because tabs can be loaded and unloaded from memory so inactive tabs are unloaded until needed. I've personally found it to be a game changer for me.

Also, the new plugin frameworks/api's that both Chrome and Firefox now use, keep the plugins from accessing data that they shouldn't Their access permissions can be granular and revoked, and they cannot access each other. Finally, you can say this plugin can access my bookmarks or not, my browser history or not, my saved passwords or not.

I personally am on board with the huge changes that the two major browsers are making under the hood, and think they are long overdue and offer significant benefits, but I respect other users' rights to choose alternative ideas/solutions.

Locked