Skip to content
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

src: reduce unnecessary serialization of CLI options in C++ #52451

Merged
merged 2 commits into from
May 2, 2024

Commits on Apr 26, 2024

  1. src: reduce unnecessary serialization of CLI options in C++

    In this patch we split the serialization routine into two different
    routines: `getCLIOptionsValues()` for only serializing the key-value
    pairs and `getCLIOptionsInfo()` for getting additional information such
    as help text etc. The former is used a lot more frequently than the
    latter, which is only used for generating `--help` and building
    `process.allowedNodeEnvironmentFlags`.
    
    `getCLIOptionsValues()` also adds `--no-` entries for boolean options so
    there is no need to special case in the JS land.
    This patch also refactors the option serialization routines to
    use v8::Object constructor that takes key-value pairs in one go
    to avoid calling Map::Set or Object::Set repeatedly which can go
    up to a patched prototype.
    joyeecheung committed Apr 26, 2024
    Configuration menu
    Copy the full SHA
    dd295c4 View commit details
    Browse the repository at this point in the history

Commits on Apr 30, 2024

  1. Configuration menu
    Copy the full SHA
    2be9ad6 View commit details
    Browse the repository at this point in the history