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
chore: enable v8_enable_private_mapping_fork_optimization by default #39253
Conversation
I think this also requires the change from https://chromium-review.googlesource.com/c/v8/v8/+/4602858 to be backported right? Or will that come in automatically in the Electron betas? |
The V8 change landed in Chromium 117 and Electron main branch is currently tracking Chromium 118. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can it be set in build/args/all.gn
instead of adding a patch?
@zcbenz is there a way to use OS specific conditions in
|
There is no way to do so, I think we can:
While there is no set rule on this, but for most build flags setting them do not break builds on unsuppoerted platforms. I think this is something we can upstream. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't this just be enabled at build time/in CI like we do for other flags, eg:
https://github.com/electron/electron/blob/main/.circleci/config/base.yml#L130 and https://github.com/electron/electron/blob/main/.circleci/config/base.yml#L591
I think we can go this route, on macOS we use posix_spawn both in Node.js and Chromium to spawn child process and it already ignores copying the @jkleinsc this is more of a feature flag change so would be better to keep it in |
dda8729
to
b090431
Compare
Build fails on mac. |
There is no |
b090431
to
38617b0
Compare
Friendly ping for review @electron/wg-api |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API LGTM
Release Notes Persisted
|
…lectron#39253) * chore: enable v8_enable_private_mapping_fork_optimization by default * chore: cherry-pick 292a4a6 from v8
Description of Change
Benchmark test https://gist.github.com/deepak1556/4a585f987c634feae28232b63a5eb0e8
There is not much impact for the chromium child processes since they get forked from zygote process which does not get impacted by the V8 heap in the main process, so most of the gain with this change are for processes forked with
child_process
api which see an 8-9x improvement in the above test for a 600MB heap.You can also disable zygote for comparison purpose
--no-zygote --no-sandbox
and the above test shows a 7x difference with the change. But this is not the most common case in real world as zygote is not disabled unless user decides to disable sandbox for the renderer process.Release Notes
Notes: Improve fork/execve performance for
child_process
api on linux