← Back to Pull requests

Pack the multi-path output rows to cut device-to-host transfer and readback #5427

Open
unknown opened this pull request with 337 lines diff across 4 files
View on GitHub
unknown unknown commented on Nov 11, 2026 17:08 UTC
Author

In get_json_object, the single-read path writes one output column per requested field, and each column's rows are laid out for the whole dataset even when a row asks for only a few of the fields. This PR batches the per-path bookkeeping that previously ran as separate whole-dataset passes: each row's per-path extents are gathered once into shared metadata buffers instead of one sparse buffer per column, the validity counts, output sizes, and error flags are read back in a single packed device-to-host transfer, and the output columns are built from the gathered metadata instead of being touched element-by-element. The output buffers therefore shrink to what the rows actually contain, and the fixed readback overhead stops scaling with the total output size.

Benchmark

GPU: Quadro RTX 6000 (sm_75), CUDA 13.3.

get_json_object_multiple_paths

38 configurations (paths={1, 8, 32, 33, 135}, input={10 MiB, 100 MiB}, row shapes={2 nested layouts}, seeds={1, 2}; two cells skipped on both sides of the comparison because the GPU ran out of memory).

Geomean: 1.78× faster than its base. The gain concentrates where the output was largest: 135-path rows are 5.25× faster (up to 8.04×), 32–33-path rows 1.9×; single-path rows are unchanged (0.99×).

Top 5 speedups

| Cell (paths · size · scenario · seed) | Speedup |
|---|---|
| 135 paths · 10 MiB · 1 · 1 | 8.04× |
| 135 paths · 10 MiB · 1 · 2 | 7.98× |
| 135 paths · 10 MiB · 0 · 1 | 6.61× |
| 135 paths · 10 MiB · 0 · 2 | 6.47× |
| 33 paths · 10 MiB · 1 · 1 | 3.47× |

get_json_object_path_types

48 configurations covering mixed query kinds (list positions, wildcards, and their mixes with plain names) — the route this PR does not change. Geomean: 1.00× (unchanged).

Admission is a member-cost model with a cap-saturation guard: the shapes a byte floor would turn away or mis-price all land on their measured-best route. On the frozen 50-cell grid (release baseline vs this stack, locked clocks) the full stack reaches a pooled geomean speedup of 1.70×; the flagged shapes now land on their measured-best side: 169-member and 340-member short rows run 6 to 14 percent faster than baseline, 50-member and 150-member rows 12 to 24 percent, rows with few members and long values run 2.5 to 5.5 times faster, and the 2×150 dense rows hold parity within noise. The 768-path wide-flat cell runs 891 to 414 milliseconds, about 2.15× faster. One disclosed exception: the single-path cell reads 3.2 percent slower than baseline, a residual present in every prior session of this grid.

<img width="1760" height="990" alt="image" src="https://github.com/user-attachments/assets/3761ef81-1a37-469a-813d-98c4aed01782" />

Diff: 337 lines (+252 / -85) across 4 files Reviewer: gerashegalov Review duration: 34108m
All Vouch review confidence checks passed
Residual risk 0.23 = Change Risk (0.42) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.42 · 337 lines diff across 4 files
0.42
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
Diff Size diff_size
0.348
Shallow Review Depth shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #5427"
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: 42.2% (MEDIUM) · Higher = larger blast radius
42.2%
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: 22.5% · Safe to merge
22.5%