perf: group export metadata reads by dataset - #14
Conversation
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (10)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe exporters now batch-load catalogue metadata and set members before building output metadata. Tests add SQL execution counters and verify bounded query counts, metadata freshness, read-only behavior, and malformed-catalogue diagnostics across exporter implementations. ChangesCatalogue batching
Priority: ➖ Normal Estimated code review effort: 4 (Complex) | ~45 minutes Merge Risk: ⚪ Minimal · up to The batched exporter changes preserve tested metadata and output behavior while removing per-variable and per-set catalogue reads. No unresolved merge-blocking risk remains. Sequence Diagram(s)sequenceDiagram
participant WideTableExporter
participant PDO
participant MetadataBuilders
WideTableExporter->>PDO: Execute grouped catalogue queries
PDO-->>WideTableExporter: Return grouped rows
WideTableExporter->>MetadataBuilders: Pass labels, rules, roles, attributes, and members
MetadataBuilders-->>WideTableExporter: Build export metadata
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
Phase 5: remove metadata N+1 reads from canonical and all three live legacy exporters (also used by migration backfill).
Verification
3222e63: five genuine count failures as dictionaries grow. GREEN5e00c74: production only, tests immutable.attribute; corrected toattrin67534e8, without dialect branching. Latest push CI 34268697340: all 20 jobs successful across PHP 8.4/8.5 and nine server versions.composer check: 615 tests, 10,468 assertions, 112 service/environment skips; validation/lint/style/PHPStan pass. Focused exporter/adapter tests: 76 pass.Measured evidence
Actual SQLite 3.45.1 / PHP 8.5.9, same installed engine 3.1.1, immutable base
c4a697eand AFTER67534e8. One warmup + five timed exports per workload/path/format; setup and read-back excluded from timing. Public adapter uses the real SAV/ZSAV writer, with query-only database access.200 variables, 100 variable sets, 100 MR sets, two cases, labels/attributes/missing values:
Counts are actual PDO SQL execution calls, not prepares or wire commands. 180/180 before/after typed output pairs matched, including metadata, ordering, diagnostics, binary64 bits and provenance; no fields excluded. All 360 captured traces contain SELECTs only. Small and existing mixed numeric/string fixtures also verified.
Limits: shared-host timing noise; tiny workloads showed some regressions (mixed-fixture full SAV median 1.449 → 2.078 ms). No universal speedup or timing SLA claimed. Server SQL correctness is covered by CI; SQLite execution of legacy server exporters is not server performance evidence. Full ranges, commands and immutable-source checksums are retained outside the product repository in
php-export-metadata-evidence.md; no benchmark framework added.Scope / next
No new malformed foreign-label ownership policy, cache, snapshot redesign, streaming, or unrelated cleanup. After user merge: Phase 6, Python dataset-filtered label reads and linear/reduced-repeat transformation planning. Overall plan remains unfinished; do not auto-merge.