-
-
Notifications
You must be signed in to change notification settings - Fork 33.9k
fs: validate fd synchronously on c++ #51027
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
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. |
mcollina
left a comment
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. |
mcollina
left a comment
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 |
mcollina
left a comment
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
getValidatedFdcalls 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/