perf: reduce repeated Zod validation work - #8305
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe router plugin compiles split-group validation and detects duplicate nodes incrementally. The Start plugin tests guarded server-function metadata parsing. The change also standardizes Zod namespace imports, updates Seroval ranges, and adds benchmark scripts. ChangesPlugin performance updates
Estimated code review effort: 3 (Moderate) | ~25 minutes Merge Risk: 🔵 Low · up to The change improves validation and metadata parsing performance. One documentation page may lack a visible H1 if no generated title is provided, making this a minor follow-up rather than a functional blocker. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 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 |
|
View your CI Pipeline Execution ↗ for commit 317562c
☁️ Nx Cloud last updated this comment at |
🚀 Changeset Version Preview6 package(s) bumped directly, 17 bumped as dependents. 🟩 Patch bumps
|
Bundle Size Benchmarks
The following scenarios have bundle-size changes compared with the baseline:
Current gzip tracks all emitted client JS chunks. Initial gzip tracks only the entry/import graph. Trend sparkline is historical current gzip ending with this PR measurement; lower is better. |
Merging this PR will improve performance by 22.7%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ⚡ | Simulation | ssr streaming deferred (react) |
705.3 ms | 445.7 ms | +58.26% |
| ⚡ | Simulation | ssr streaming deferred (vue) |
759.9 ms | 494 ms | +53.81% |
| ⚡ | Memory | mem server streaming-peak chunked (react) |
1,159.4 KB | 818.7 KB | +41.61% |
| ⚡ | Simulation | ssr streaming deferred (solid) |
1,051.5 ms | 788.6 ms | +33.33% |
| ⚡ | Simulation | ssr server-fn send-context (solid) |
285.2 ms | 248.9 ms | +14.57% |
| ⚡ | Simulation | ssr server-fn send-context (react) |
284.2 ms | 248.3 ms | +14.48% |
| ⚡ | Simulation | ssr server-fn send-context (vue) |
285.9 ms | 250 ms | +14.36% |
| ⚡ | Simulation | ssr global-mw server-fn (solid) |
234.6 ms | 225.7 ms | +3.94% |
| ⚡ | Simulation | ssr global-mw server-fn (react) |
234.7 ms | 225.9 ms | +3.89% |
| ⚡ | Simulation | ssr global-mw server-fn (vue) |
235.3 ms | 226.5 ms | +3.88% |
Tip
Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.
Comparing perf/zod-validation-fast-path (317562c) with main (6494e75)
572e1ad to
0a079c5
Compare
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
🎯 Changes
Replaces #8301 with only the Zod validation work, based directly on
main.Compile the code-splitting grouping schema and check duplicates without flattening or copying arrays. Skip Zod parsing for Rspack modules without server-function metadata. Preserve grouping diagnostics and valid metadata parsing, including cloned output and unknown-key stripping.
Add behavior tests and Vitest benchmarks for grouping validation and metadata restoration.
✅ Checklist
🚀 Release Impact
Summary by CodeRabbit
Performance
Bug Fixes
Documentation
Tests