← Back to Pull requests

perf: drop node positions after metadata #1236

Open
unknown opened this pull request with 196 lines diff across 2 files
View on GitHub
unknown unknown commented on Nov 03, 2026 19:33 UTC
Author

<!--
Please read the Code of Conduct and the Contributing Guidelines before opening a pull request.
-->

Description

This PR drops position from every node of metadata's entries once they're parsed. Nothing after metadata reads 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-simple writes 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 a position. json-simple is the only target whose output changes.

Related Issues

Split out of #1205.

Check List

  • I have read the Contributing Guidelines and made commit messages that follow the guideline.

  • I have run node --run test and all tests passed.

  • I have check code formatting with node --run format:check & node --run lint.

  • I've covered new added functionality with unit tests if necessary.
  • Diff: 196 lines (+147 / -49) across 2 files Reviewer: avivkeller Review duration: 33091m
    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
    0.36
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    46%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    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
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 36.1% (MEDIUM) · Higher = larger blast radius
    36.1%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 46.7% · Lower = rushed or shallow review
    46.7%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 19.2% · Safe to merge
    19.2%
    Repository