Repository navigation
Description
In an attempt to upgrade GitHub Desktop to Electron v12 and then v13, we ran into a performance issue affecting unsigned builds on Big Sur (and potentially Monterey too). More specifically, using spawn becomes very slow.
The problem seems to be in libuv, and a first attempt to fix it made some Node.js tests fail, so the change was reverted. This affects other apps like VS Code, and they decided to apply the changes to Electron, ignoring those broken Node.js tests, but they found other problems derived from this that they had to deal with.
Right now we don't need anything from Electron v12 or v13, so we're gonna wait until there is more progress around this. Our hopes are in a new PR trying to fix this, but the new fix led to a kernel bug that has been reported to Apple.
Related issues:
- Issue in libuv: uv_spawn is slow when parent process allocates mmap with MAP_JIT flag libuv/libuv#3050
- First report in the Electron repo: child_process spawn locks up renderer for 300 - 3000ms on signed app on macOS Big Sur electron/electron#26143
- Same issue in VS Code: Slow spawn from ext host process when built from sources microsoft/vscode#132654
- VS Code uses a fork with the first fix but it causes its own issues: child_process spawn locks up renderer for 300 - 3000ms on signed app on macOS Big Sur electron/electron#26143 (comment)
- First attempt o fix the issue: darwin: Use posix_spawn to spawn subprocesses in macOS libuv/libuv#3064
- Second attempt to fix the issue: posix spawn, take 2 libuv/libuv#3257
Activity
Only use MAP_JIT on Apple Silicon