Uh oh!
There was an error while loading. Please reload this page.
fs: improve error performance of opendirSync - #49705
Conversation
nodejs-github-bot
commented
Sep 18, 2023
nodejs-github-bot
commented
Sep 18, 2023
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
nodejs-github-bot
commented
Sep 19, 2023
BridgeAR
left a comment
There was a problem hiding this comment.
Could we improve error handling in JS in general before we move all of this into C++? I believe there's likely not a big difference anymore as soon as that's fixed.
anonrig
commented
Sep 19, 2023
@BridgeAR There is also the cost of crossing the C++ and JavaScript boundary that'll still be there even after we improve the error creation performance. |
nodejs-github-bot
commented
Sep 19, 2023
anonrig
commented
Sep 20, 2023
cc @nodejs/cpp-reviewers can you review? |
For the simple FS errors I think it would probably be pretty hard to make the JS error creation performance on-par with the C++ one if we want to hide internal frames. If we throw from C++, we hide them for free, the stack is only going to be captured when the user access |
Shouldn't openDir (the C++ one) be also updated to remove the sync code now that it's in another function? |
anonrig
commented
Sep 21, 2023
@targos |
nodejs-github-bot
commented
Sep 21, 2023
Landed in 571ecbf |
RafaelGSS
commented
Sep 21, 2023
I see the |
anonrig
commented
Sep 21, 2023
@RafaelGSS I didn't follow up with the label I've added. I don't think it's necessary for this pull request since it's highly unlikely to cause regression. |
RafaelGSS
commented
Sep 21, 2023
But would be great to have actual reliable numbers to share. People might see this PR when scrolling the CHANGELOG. |
PR-URL: #49705 Refs: nodejs/performance#106 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Ref: nodejs/performance#106