Skip to content

events: inline hybrid dispatch closures - #64473

Open
slagiewka wants to merge 2 commits into
nodejs:mainfrom
slagiewka:et
Open

events: inline hybrid dispatch closures#64473
slagiewka wants to merge 2 commits into
nodejs:mainfrom
slagiewka:et

Conversation

@slagiewka

Copy link
Copy Markdown

lib: inline createEvent hybrid dispatch closure

Originally added in 16b11cd, it first
had three callers. Now there's only one branch requireing it.

lib: inline iterationCondition hybrid dispatch closure

While more readable, the removed closure overhead unlocks 10-20% in
eventtarget.js benchmark (30 runs).

@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label Jul 13, 2026
@slagiewka

Copy link
Copy Markdown
Author

Looks like the convention for commit scope here is either events or lib. I'm fine with both, LMK and I will rewrite these commits.

Originally added in 16b11cd, it first
had three callers. Now there's only one branch requireing it.

Signed-off-by: Szymon Łągiewka <slagiewka@users.noreply.github.com>
While more readable, the removed closure overhead unlocks 10-20% in
eventtarget.js benchmark.

Signed-off-by: Szymon Łągiewka <slagiewka@users.noreply.github.com>
@slagiewka slagiewka changed the title lib: inline hybrid dispatch closures events: inline hybrid dispatch closures Jul 14, 2026
@avivkeller avivkeller added the needs-benchmark-ci PR that need a benchmark CI run. label Jul 21, 2026
@avivkeller

Copy link
Copy Markdown
Member

@nodejs/events

@codecov

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.24%. Comparing base (384d7a4) to head (27fce3a).
⚠️ Report is 75 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #64473      +/-   ##
==========================================
+ Coverage   90.21%   90.24%   +0.03%     
==========================================
  Files         741      741              
  Lines      241608   241680      +72     
  Branches    45534    45542       +8     
==========================================
+ Hits       217972   218110     +138     
+ Misses      15154    15112      -42     
+ Partials     8482     8458      -24     
Files with missing lines Coverage Δ
lib/internal/event_target.js 99.17% <100.00%> (-0.01%) ⬇️

... and 40 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

3 participants