src: stop shrinking async resource stack on pop #67362
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 288 lines diff across 3 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.339
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #67362"
general
weight: 0.35
gurgunday
pop_async_context()calledshrink_to_fit()on every pop. The stack is usually empty once a callback returns, so libc++ and MSVC free the deque's storage and the next push allocates it again. That happens several times per HTTP request.The shrink used to run only when the stack was large and mostly unused. That check was dropped in #56457.
Measured on macOS (Apple M2, libc++). libstdc++ skips the free in this case, so the gain on Linux is likely small.
<details>
<summary>benchmark/http/simple.js</summary>
</details>
Refs: <https://github.com/nodejs/node/pull/56457>