Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

events: refactored emit to improve performance #56741

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

KunalKumar-1
Copy link
Contributor

These changes improve the overall efficiency and maintainability of the emit method

  • Refactored error handling logic for clarity and efficiency
  • Streamlined error inspection and stringification process
  • Enhanced stack trace handling with minimal performance overhead
  • Simplified listener iteration and result handling in emit method

Fixes: #53056

Refactored error handling logic for clarity and efficiency.
Streamlined error inspection and stringification process.
Enhanced stack trace handling with minimal performance overhead.
Simplified listener iteration and result handling in emit method.

Fixes: nodejs#53056
Signed-off-by: KUNAL KUMAR <[email protected]>
@nodejs-github-bot nodejs-github-bot added events Issues and PRs related to the events subsystem / EventEmitter. needs-ci PRs that need a full CI run. labels Jan 24, 2025
@anonrig anonrig added the needs-benchmark-ci PR that need a benchmark CI run. label Jan 24, 2025
Copy link

codecov bot commented Jan 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.20%. Comparing base (08eeddf) to head (79a8f78).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #56741      +/-   ##
==========================================
- Coverage   89.21%   89.20%   -0.01%     
==========================================
  Files         662      662              
  Lines      191968   191958      -10     
  Branches    36955    36952       -3     
==========================================
- Hits       171269   171242      -27     
- Misses      13535    13552      +17     
  Partials     7164     7164              
Files with missing lines Coverage Δ
lib/events.js 99.58% <100.00%> (-0.17%) ⬇️

... and 42 files with indirect coverage changes

@KunalKumar-1 KunalKumar-1 changed the title events: refactor emit to improve performance events: refactored emit to improve performance Jan 26, 2025
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. needs-benchmark-ci PR that need a benchmark CI run. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Performance Enhancement in EventEmitter’s emit Method
3 participants