Pack the multi-path output rows to cut device-to-host transfer and readback #5427
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
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
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
gerashegalov
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_paths38 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_types48 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" />