Grouping child processes in node-webkit or atom/electron

531 Views Asked by At

I am doing some research into building a cross-platform desktop application using web technologies. Both node-webkit and electron/atom would be perfect for the job.

However, with it being a multi-window app, my clients aren't too keen on the vast number of processes which chromium creates (2 per window).

I've looked into passing some different command line switches, --single-process and a few others but they only seem to cause the app to crash on startup.

I then looked at node itself, the closest i got here was the process API exposes methods to set the group PID. Alas, this is unsupported on windows which is my primary target platform.

I don't know if you've ever googled "hide process from task manager", it's starting to look a bit scary and deep-webish. there must be an easier way.

Does anyone have some suggestions or maybe a different technology?

2

There are 2 best solutions below

0
On BEST ANSWER

This isn't possible, sorry! The code that allows single-process in Chromium is busted and bitrotted

1
On

I've been dealing with the same issue and can confirm that as of Electron version 1.4.10 the --single-process flag is still crashing the app. I ended up using --process-per-site. It groups the processes per web site/domain. If you are using Angular in your app (with the same index page), all Browsers will be launched with the same process. https://www.chromium.org/developers/design-documents/process-models