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
child_process.spawn is considerably slower in Electron 12+ #32480
Comments
Related - #26143? |
@RaisinTen @nornagon The delay only occurs on macOS running Big Sur, and only when Electron 12 or greater. Electron 11 and lower are fine! |
In that case, should we close this issue in favour of #26143 as this is a duplicate of that? |
Perhaps, although I'm seeing normal behaviour using Electron 11 on Big Sur. For me the problem arises after updating to 12+. |
I also encountered this problem, after version 12 using the node main process fork the child process is about 800ms slower. |
The result of running the same code on version 11 and version 12+ is that version 12+ is 800 ms slower. |
@dreamthen the libuv patch that fixes the perf regression has been merged and backported to v15, v16, v17 and v18; see #33337, so this shouldn't be an issue anymore if you are on supported versions. |
well done~it works. |
We've discovered an issue with macOS (Big Sur) and Electron 12 and above (Node 14 and above), where spawning a child_process takes considerably longer than Electron 11 and lower (Node 12 and lower).
Here's an example app with instructions to demonstrate the problem:
https://github.com/dev-manager-uk/spawn-delay
After running the app initially, you'll notice the spawn function takes ~10ms.
After upgrading Electron to 12 or higher, you'll notice the spawn function takes ~500ms!
What's changed to cause this and can anything be done about it?
Thanks!
-- UPDATE --
macOS (Big Sur) - Bug exists
macOS (Mojave) - unable to replicate this bug
Windows 10 - unable to replicate this bug
The text was updated successfully, but these errors were encountered: