0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 07:53:06 +01:00
nodejs/tools/v8_gypfiles
Keyhan Vakil 7eafd2f7e8 child_process: improve spawn performance on Linux
Speed up child_process.spawn by enabling the new V8 build flag which
makes fork/exec faster.

Here are the results of running the existing benchmark. Note that this
optimization helps more for applications with larger heaps, so this is
somewhat of an underestimate of the real world performance benefits.

```console
$ ./node benchmark/compare.js --runs 15 \
        --new ./node \
        --old ~/node-v20/out/Release/node \
        --filter params child_process > cpr
$ node-benchmark-compare cpr
                                 confidence improvement  (***)
methodName='exec' n=1000                ***     60.84 % ±5.43%
methodName='execFile' n=1000            ***     53.72 % ±3.33%
methodName='execFileSync' n=1000        ***      9.10 % ±0.84%
methodName='execSync' n=1000            ***     10.44 % ±0.97%
methodName='spawn' n=1000               ***     53.10 % ±2.90%
methodName='spawnSync' n=1000           ***      8.64 % ±1.22%

  0.01 false positives, when considering a 0.1% risk acceptance (***)
```

Fixes: https://github.com/nodejs/node/issues/25382
Fixes: https://github.com/nodejs/node/issues/14917
Refs: https://github.com/nodejs/performance/issues/93
Refs: https://github.com/nodejs/performance/issues/89
PR-URL: https://github.com/nodejs/node/pull/48523
Refs: 1a782f6543
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
2023-06-24 17:34:44 +00:00
..
d8.gyp build, deps, tools: avoid excessive LTO 2023-04-06 00:24:58 +00:00
directory.build.props
extras-libraries.cc
features.gypi child_process: improve spawn performance on Linux 2023-06-24 17:34:44 +00:00
ForEachFormat.py
ForEachReplace.py
GN-scraper.py
inspector.gypi tools: update V8 gypfiles for 11.1 2023-03-31 14:15:31 +00:00
toolchain.gypi
v8.gyp tools: refactor v8_pch config 2023-05-28 12:01:50 +00:00
v8vtune.gyp