lib: stop refreshing composite AbortSignals #67543
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.35) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.35 · 176 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.310
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #67543"
general
weight: 0.35
panva
Since #66014,
AbortSignal.any()follows its sources as soon as it creates a composite, so aborting a source aborts every composite that follows it right away. Theabortedandreasongetters andthrowIfAborted()still walked the composite's sources on every call. ProfilingthrowIfAborted()on a two-source composite put 91% of the time in that walk, most of it inWeakRef.prototype.deref(), which adds its target to the kept objects of the current job.That walk can't find anything anymore: a composite is always aborted by the time one of its sources is. So this removes
refreshCompositeSignal()and adds a benchmark forthrowIfAborted().test-abortsignal-any-source-gcalready checks each accessor after a source has been aborted and collected.node benchmark/abort_controller/abort-signal-throw-if-aborted.js, release builds of main and this branch, Linux x64, 30 interleaved runs per binary:| kind | improvement | 95% CI |
|---|---|---|
| controller | 7.38% | ± 3.84% |
| timeout | 6.84% | ± 3.04% |
| any | 1652.02% | ± 37.91% |
| mixed | 430.80% | ± 12.60% |
The
abortedgetter gets the same speedup. In the existingabort_controllerbenchmarks,anywithlistenis 7% faster andaddAbortListeneris 2-3.5% slower. Its optimized code is the same apart from the removed check (same inlining, no deopts), so I think that one is code layout, but it shows up consistently.