Skip to content

lib: use indexed appends for dependent signals - #67299

Open
rozzilla wants to merge 2 commits into
nodejs:mainfrom
rozzilla:perf-abortsignal-fanout-append
Open

rozzilla wants to merge 2 commits into
nodejs:mainfrom
rozzilla:perf-abortsignal-fanout-append

Conversation

@rozzilla

@rozzilla rozzilla commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Use indexed writes instead of primordial push calls when collecting dependent signals to abort.
Abort-throughput benchmarks on Apple M2/macOS 15.7.4, using rebuilt Node v28.0.0-pre binaries against 47438d9. Fixtures were created outside timing, with 30 samples per binary:

Dependents per source Aborts per sample Candidate vs baseline
16 2,000 +18.55% ±11.94%
64 1,000 +28.07% ±10.37%

Validation:

  • make -j8: passed
  • make lint-js: passed
  • python3 tools/test.py parallel/test-abortsignal-any.mjs parallel/test-abortsignal-drop-settled-signals.mjs: passed
  • make -j4 test: not run

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/performance

@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label Nov 6, 2026
@codecov

codecov Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.72%. Comparing base (f344e7f) to head (b891ca2).
⚠️ Report is 25 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #67299      +/-   ##
==========================================
- Coverage   90.73%   90.72%   -0.01%     
==========================================
  Files         798      798              
  Lines      279993   280101     +108     
  Branches    53866    53888      +22     
==========================================
+ Hits       254047   254133      +86     
- Misses      16229    16257      +28     
+ Partials     9717     9711       -6     
Files with missing lines Coverage Δ
lib/internal/abort_controller.js 95.41% <100.00%> (-0.01%) ⬇️

... and 42 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.

Avoid a primordial push call for each dependent signal.

Signed-off-by: Roberto Bianchi <roberto.bianchi@spendesk.com>
Signed-off-by: Roberto Bianchi <roberto.bianchi@spendesk.com>
@rozzilla
rozzilla force-pushed the perf-abortsignal-fanout-append branch from afd1bf6 to b891ca2 Compare November 11, 2026 09:19
@rozzilla
rozzilla requested a review from gurgunday November 11, 2026 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants