fs: improve error performance of opendirSync#49705
fs: improve error performance of opendirSync#49705nodejs-github-bot merged 2 commits intonodejs:mainfrom
opendirSync#49705Conversation
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.
@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. |
|
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? |
@targos |
|
Landed in 571ecbf |
|
I see the |
|
@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. |
|
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 <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
PR-URL: nodejs#49705 Refs: nodejs/performance#106 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
Ref: nodejs/performance#106