-
Notifications
You must be signed in to change notification settings - Fork 7
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
Optimize child_process performance #138
Comments
We already tried to optimize it once: #89 |
There is still room for optimizations probably |
The linked v8 issue is closed. The NodeJS half of that issue has also been resolved. While there still may be issues related to child_process spawn performance, they are not related to this v8 issue. Refs: https://bugs.chromium.org/p/v8/issues/detail?id=7381 Refs: nodejs#48523 Refs: nodejs/performance#138
I don't think your benchmark is really measuring child_process spawn performance, just the overhead of launching node compared to bash. Comment out every line in the node script and see how little the timing changes. For me on macOS, the hyperfine-measured time goes from ~38ms to ~34ms. |
4ms is still a lot, but a lot less crazy than 20ms or 38ms 🌞. |
The linked v8 issue is closed. The NodeJS half of that issue has also been resolved. While there still may be issues related to child_process spawn performance, they are not related to this v8 issue. Refs: https://bugs.chromium.org/p/v8/issues/detail?id=7381 Refs: #48523 Refs: nodejs/performance#138 PR-URL: #51467 Reviewed-By: Keyhan Vakil <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
The linked v8 issue is closed. The NodeJS half of that issue has also been resolved. While there still may be issues related to child_process spawn performance, they are not related to this v8 issue. Refs: https://bugs.chromium.org/p/v8/issues/detail?id=7381 Refs: nodejs#48523 Refs: nodejs/performance#138 PR-URL: nodejs#51467 Reviewed-By: Keyhan Vakil <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
The linked v8 issue is closed. The NodeJS half of that issue has also been resolved. While there still may be issues related to child_process spawn performance, they are not related to this v8 issue. Refs: https://bugs.chromium.org/p/v8/issues/detail?id=7381 Refs: nodejs#48523 Refs: nodejs/performance#138 PR-URL: nodejs#51467 Reviewed-By: Keyhan Vakil <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
The linked v8 issue is closed. The NodeJS half of that issue has also been resolved. While there still may be issues related to child_process spawn performance, they are not related to this v8 issue. Refs: https://bugs.chromium.org/p/v8/issues/detail?id=7381 Refs: nodejs#48523 Refs: nodejs/performance#138 PR-URL: nodejs#51467 Reviewed-By: Keyhan Vakil <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
The linked v8 issue is closed. The NodeJS half of that issue has also been resolved. While there still may be issues related to child_process spawn performance, they are not related to this v8 issue. Refs: https://bugs.chromium.org/p/v8/issues/detail?id=7381 Refs: #48523 Refs: nodejs/performance#138 PR-URL: #51467 Reviewed-By: Keyhan Vakil <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
The linked v8 issue is closed. The NodeJS half of that issue has also been resolved. While there still may be issues related to child_process spawn performance, they are not related to this v8 issue. Refs: https://bugs.chromium.org/p/v8/issues/detail?id=7381 Refs: nodejs#48523 Refs: nodejs/performance#138 PR-URL: nodejs#51467 Reviewed-By: Keyhan Vakil <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
The linked v8 issue is closed. The NodeJS half of that issue has also been resolved. While there still may be issues related to child_process spawn performance, they are not related to this v8 issue. Refs: https://bugs.chromium.org/p/v8/issues/detail?id=7381 Refs: #48523 Refs: nodejs/performance#138 PR-URL: #51467 Reviewed-By: Keyhan Vakil <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
The linked v8 issue is closed. The NodeJS half of that issue has also been resolved. While there still may be issues related to child_process spawn performance, they are not related to this v8 issue. Refs: https://bugs.chromium.org/p/v8/issues/detail?id=7381 Refs: #48523 Refs: nodejs/performance#138 PR-URL: #51467 Reviewed-By: Keyhan Vakil <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
child_process takes ~20ms to run a script with
execSync
. If this can be optimized further, that would be great.Use case
I have ported some bash scripts to Node.js to make them more easily cross-platform. But sometimes that means using child_process to call out to other programs (e.g.
git
). These calls can add up and make me think twice about the performance tradeoff.Benchmark
Here's a benchmark: https://github.com/mehulkar/bench-childprocess
Ref
The text was updated successfully, but these errors were encountered: