perf: drop node positions after metadata #1236
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.36) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 196 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 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
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.316
Real PR Conversation Timeline
1 comments
"Review active on #1236"
general
weight: 0.35
avivkeller
<!--
Please read the Code of Conduct and the Contributing Guidelines before opening a pull request.
-->
Description
This PR drops
positionfrom every node ofmetadata's entries once they're parsed. Nothing aftermetadatareads it (the type warnings that print positions run while it parses), and on Node.js's docs it's ~480k objects, about 80MB, that the main thread holds and copies to and from the workers.json-simplewrites the metadata as is, so it loses them too, at about a third of its size.| Build | Threads | Before | This PR |
| --- | --- | --- | --- |
| site | 4 | 9.25s, 1797MB | 8.75s (-5%), 1762MB (-2%) |
| site | 6 | 8.50s, 2216MB | 8.04s (-5%), 2110MB (-5%) |
| legacy | 4 | 4.24s, 1539MB | 4.04s (-5%), 1502MB (-2%) |
| legacy | 6 | 4.20s, 1972MB | 3.99s (-5%), 1920MB (-3%) |
Validation
Added
drops position from every node of an entry, which checks that no node of a parsed entry's content has aposition.json-simpleis the only target whose output changes.Related Issues
Split out of #1205.
Check List
node --run testand all tests passed.node --run format:check&node --run lint.