GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — lib: refactor to use optional chaining by pd4d10 · Pull Request #38697 · nodejs/node Conversation
|
|
I'm not sure we want to do that after #38245... |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| get fd() { | ||
| return this.#channel ? this.#channel.fd : undefined; | ||
| return this.#channel?.fd ?? undefined; |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| return this.#channel?.fd ?? undefined; | |
| return this.#channel?.fd; |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| return false; | ||
| const request = stream[kRequest]; | ||
| return request ? request.readable : stream.readable; | ||
| return request?.readable ?? stream.readable; |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| return request?.readable ?? stream.readable; | |
| return stream[kRequest]?.readable ?? stream.readable; |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| function debugStreamObj(stream, message, ...args) { | ||
| const session = stream[kSession]; | ||
| const type = session ? session[kType] : undefined; | ||
| const type = session?.kType ?? undefined; |
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| const type = session?.kType ?? undefined; | |
| const type = stream[kSession]?.[kType]; |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| function onError(msg, err, callback) { | ||
| const triggerAsyncId = msg.socket ? msg.socket[async_id_symbol] : undefined; | ||
| const triggerAsyncId = msg.socket?.[async_id_symbol] ?? undefined; |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| const triggerAsyncId = msg.socket?.[async_id_symbol] ?? undefined; | |
| const triggerAsyncId = msg.socket?.[async_id_symbol]; |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
OK. Given this information, I guess we should hold it until the performance issues solved. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Those changes look great, and I see the potential performance issue was also taken into consideration, that's awesome, however would like to raise a hand and ask if the chaining is slower than the ternary operator.
📝 CC @ronag #50337 (comment)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This issue/PR was marked as stalled, it will be automatically closed in 30 days. If it should remain open, please leave a comment explaining why it should remain open. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Closing this because it has stalled. Feel free to reopen if this issue/PR is still relevant, or to ping the collaborator who labelled it stalled if you have any questions. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.