perf(cubeorchestrator): Drop DBResponseValue wrapper (-15% transform)#10844
perf(cubeorchestrator): Drop DBResponseValue wrapper (-15% transform)#10844
Conversation
`DBResponseValue` had three variants but only `Primitive` was ever constructed in production. `DateTime` and `Object` existed only in tests (the latter even carried `// TODO: Is this variant still used?`). The wrapper added per-cell discriminant + alignment overhead and a dead match arm in the `transform_value` hot loop. `TransformedData::transform` columnar path: | bench | time | Δ | |------------------------|-----------|----------| | columnar/c16_r10000 | 2.26 ms | −13.7% | | columnar/c16_r50000 | 13.89 ms | −18.9% | | columnar/c16_r100000 | 38.45 ms | −16.5% | | columnar/c32_r10000 | 4.81 ms | −18.3% | | columnar/c32_r50000 | 26.85 ms | −11.2% | | columnar/c64_r100000 | 108.4 ms | −10.6% | Real-shape scenarios (c16×100k): | scenario | Δ | |--------------------------------------------|--------| | columnar / no_time_dim | −23.8% | | columnar / one_time_dim_day | −15.0% | | columnar / one_time_dim_custom_granularity | −15.1% | | columnar / two_time_dims | −12.7% | | vanilla / one_time_dim_day | −9.1% | | vanilla / two_time_dims | −7.3% | Vanilla path: −3% to −9% across most shapes. Compact path: −1% to −12%. JS→Rust columnar parse_plus_build (c16-c32 × 100k): ~−3%.
|
Claude finished @ovr's task in 1m 31s —— View job Code Review: PR #10844
Verdict: This is a clean, well-motivated removal of dead code. Looks good to merge. ✅ Detailed reviewCorrectness The change is safe.
After this PR, all sites now work directly with
Performance The PR description's benchmark numbers are credible. Removing the enum wrapper eliminates:
Testing The removed tests ( TypeScript side The Nit (non-blocking) The No issues found. Nice cleanup. 👍 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #10844 +/- ##
==========================================
+ Coverage 78.84% 83.47% +4.63%
==========================================
Files 470 254 -216
Lines 92274 75350 -16924
Branches 3433 0 -3433
==========================================
- Hits 72751 62901 -9850
+ Misses 19020 12449 -6571
+ Partials 503 0 -503
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
DBResponseValuehad three variants but onlyPrimitivewas ever constructed in production.DateTimeandObjectexisted only in tests (the latter even carried// TODO: Is this variant still used?). The wrapper added per-cell discriminant + alignment overhead and a dead match arm in thetransform_valuehot loop.TransformedData::transformcolumnar path:Real-shape scenarios (c16×100k):