FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

lib: refactor events.js by RaisinTen · Pull Request #36528 · nodejs/node · GitHub

/ node Public

lib: refactor events.js - #36528

Closed
RaisinTen wants to merge 2 commits into
nodejs:masterfrom
RaisinTen:lib/refactor-to-use-optional-chaining-in-events.js
Closed

lib: refactor events.js#36528
RaisinTen wants to merge 2 commits into
nodejs:masterfrom
RaisinTen:lib/refactor-to-use-optional-chaining-in-events.js

Conversation

RaisinTen commented Dec 15, 2020
edited
Loading

Copy link
Copy Markdown
Member
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

nodejs-github-bot added the events Issues and PRs related to the events subsystem / EventEmitter. label Dec 15, 2020
Comment thread lib/events.js


if (opts && opts.captureRejections) {
if (opts?.captureRejections) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

We'll need to benchmark these changes. The entire events.js file is one of the most performance sensitive in core and changes here can have massive impact throughout. Last I benchmarked, optional chaining still had some performance lag that hadn't been fully optimized out. That's not a block on this on it's own but let's be sure to run benchmarks before this lands.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I'm also not a fan of the optional chaining operator. I think it hinders readability.

Lxxyx commented Dec 15, 2020

Copy link
Copy Markdown
Member

The pull request is duplicate with #36304.

I know this because just last night, I closed a Pull Request for the same(#36517) 😂

Copy link
Copy Markdown
Member Author

@Lxxyx whoops, thanks for telling :)

aduh95 commented Dec 16, 2020

Copy link
Copy Markdown
Contributor

@RaisinTen BTW if you want to help me resolve the perf regressions of #36304, that's be awesome!

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

events Issues and PRs related to the events subsystem / EventEmitter.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants


Back | FazBrowse Home | New Git URL