-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
fs: validate fd synchronously on c++ #51027
Conversation
It is semver-major, and would be a very disruptive change, especially if it happens incrementally. It's been a general rule for a long time in Node.js that validation happens synchronously. |
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.
I'm -1 for the reasons mentioned by @targos.
See also #49970, which is blocked on the same problem as far as I am aware. |
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.
lgtm
d406848
to
7935836
Compare
cc @nodejs/fs @nodejs/cpp-reviewers |
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.
lgtm
Landed in 65e70bf |
PR-URL: #51027 Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
PR-URL: #51027 Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
This PR moves all
getValidatedFd
calls to C++. Improves error path performance by ~17-42%.Benchmark CI: https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/1482/