[v18.x backport] src,lib: reducing C++ calls of esm legacy main resolve #49644
[v18.x backport] src,lib: reducing C++ calls of esm legacy main resolve #49644H4ad wants to merge 5 commits intonodejs:v18.x-stagingfrom
Conversation
|
Review requested:
|
|
I didn't know how backport works but this PR should be landed with #48664 since they contain fixes that were not detected in this initial PR. |
| return guess; | ||
| const packageJsonUrlString = packageJSONUrl.href; | ||
|
|
||
| if (typeof packageJsonUrlString !== 'string') { |
There was a problem hiding this comment.
Are you sure this is correct? href attribute of a URL always returns string.
There was a problem hiding this comment.
Yes, it always returns a string, but since I didn't know for sure if packageJSONUrl is a URL, in the old code we had validations but in this one I needed to make this validation explicit.
ef85828 to
490fc00
Compare
3a1addf to
4f095e1
Compare
|
Hey, I'm sorry but a lot of commit landed on the staging branch since you opened this backport and now it has conflicts. |
Instead of many C++ calls, now we make only one C++ call to return a enum number that represents the selected state. Backport-PR-URL: nodejs#48325
4f095e1 to
2c8a182
Compare
|
Yes it's ok! |
PR-URL: nodejs#48664 Refs: nodejs#48325 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]> Backport-PR-URL: nodejs#48664
|
@targos Done! |
|
@nodejs/lts / @nodejs/releasers Now that Node.js 18 is in maintenance I think the risks of this backport PR outweigh potential benefits. Thoughts? |
+1, I don't think we should be landing performance improvement backports in a maintenance release line |
|
I agree, this improvement helps but is not that significant that worth the risk. |
Backport of #48325