-
Notifications
You must be signed in to change notification settings - Fork 15.3k
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support all standard chromium process models #6903
Comments
Electron has a main process which is roughly just nodejs and it can create new windows which have a process each. That is the whole model. The concept of 'site' or 'per site' doesn't make much sense here as Electron isn't oriented around showing sites like a web browser. |
From what I understood, Electron is a wrapper around libchromiumcontent, which in turn handles all the windows -- Electron just makes calls into the chromium instance to create BrowserWindows, and BrowserWindows are just nodejs objects bound to chromium windows. Is that incorrect? |
It is windows with nodejs support and some other Electron APIs baked. But yes, you're description @krillr sounds about right. |
So what I'm requesting is that libchromium be configurable to use any one of its many process models. In Electron's current state, libchromium uses its default process-per-site-instance model. Every time a dialog is opened, a new window is spawned, etc -- a new process is spawned to render that window. This makes sense in the context of a web browser, but leads to unnecessary memory usage in a desktop application. Making this configurable would allow those of us whose apps don't need advanced security models like process-per-site-instance to optimize our applications. |
Single process model doesn't work with node.js and is also super busted / bitrotted |
Ok, well the process-per-site model would work just as well, and it is fully supported by chromium. |
Huh, I guess passing the relevant chrome options to electron "just works" -- not sure why I didn't just try that. Needs docs I guess. |
The process model in Electron is different from any process model in Chromium, the renderer process is forced to restart for every navigation, otherwise leaks would happen. This is because Node is currently designed to have only one instance in one process, and it doesn't cleanup all the resources one JavaScript environment is destroyed. I'm closing this as won't fix since current process model is restricted by the design of Node. |
If that's the case, how come the flag "--process-per-site" works fine -- it On Sunday, August 21, 2016, Cheng Zhao notifications@github.com wrote:
|
@krillr I suspect it doesn't actually work fine - if you tried:
This would blow up |
It doesn't blow up, but it does stop JS execution in the second window. On Mon, Aug 22, 2016 at 10:43 AM, Paul Betts notifications@github.com
|
Hi @zcbenz , It isn't possible to have chromium process model in sandboxed renderers ? |
@zcbenz Is that still necessary when node integration is off? |
By default Electron appears to use the process-per-site-instance process model. It would be best to allow developers to choose between the available models, for example I would much like to use the single-process model while others would likely prefer the process-per-site model. Enabling the command-line switch for this setting in chromium would be ideal.
The text was updated successfully, but these errors were encountered: