perf(start-client-core): avoid unused middleware array - #8353
perf(start-client-core): avoid unused middleware array#8353LadyBluenotes wants to merge 3 commits into
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 selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe middleware builder now uses ChangesMiddleware registration
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Refactor Merge Risk: ⚪ Minimal · up to This is a localized performance cleanup with no remaining actionable merge risk. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 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 |
|
View your CI Pipeline Execution ↗ for commit 81414d8
☁️ Nx Cloud last updated this comment at |
🚀 Changeset Version Preview4 package(s) bumped directly, 20 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. |
There was a problem hiding this comment.
Nx Cloud has identified a flaky task in your failed CI:
🔂 Since the failure was identified as flaky, we triggered a CI rerun by adding an empty commit to this branch.
🎓 Learn more about Self-Healing CI on nx.dev
|
would a for loop be even better than using array methods? |
yeah youre right. ill update |
ce7bb7b to
50a4560
Compare
50a4560 to
ec6bd76
Compare
forEach keeps the hole-skipping and length-snapshot semantics the tests cover without the extra `in` check and length hoist, and it avoids the result array that map allocated. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
🎯 Changes
Use an indexed loop instead of
mapwhen registering server-function middleware. This avoids the unused result array and the iteration callback. Composition order, factory expansion, and sparse-array handling stay unchanged. The loop captures the initial array length, so entries appended during registration are not visited. Request execution is untouched.✅ Checklist
🚀 Release Impact
Summary by CodeRabbit
Bug Fixes
Tests