Skip to content

Conversation

@RaisinTen
Copy link
Member

@RaisinTen RaisinTen commented Dec 15, 2020

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

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


if (opts && opts.captureRejections) {
if (opts?.captureRejections) {
Copy link
Member

Choose a reason for hiding this comment

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

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
Member

Choose a reason for hiding this comment

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

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

@Lxxyx
Copy link
Member

Lxxyx commented Dec 15, 2020

The pull request is duplicate with #36304.

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

@RaisinTen
Copy link
Member Author

@Lxxyx whoops, thanks for telling :)

@RaisinTen RaisinTen closed this Dec 16, 2020
RaisinTen added a commit to RaisinTen/node that referenced this pull request Dec 16, 2020
@aduh95
Copy link
Contributor

aduh95 commented Dec 16, 2020

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

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