-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
refactor(router-core): index nodes can skip the stack loop, they cannot have children #6173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(router-core): index nodes can skip the stack loop, they cannot have children #6173
Conversation
WalkthroughThe change refines route tree matching logic by simplifying early-match conditions, adding explicit index match handling with early termination for perfect matches, adjusting wildcard index behavior, and removing a previous stack-based index match exploration path. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (2)**/*.{ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{js,ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
🧠 Learnings (7)📓 Common learnings📚 Learning: 2025-12-21T12:52:27.078ZApplied to files:
📚 Learning: 2025-12-17T02:17:55.086ZApplied to files:
📚 Learning: 2025-10-08T08:11:47.088ZApplied to files:
📚 Learning: 2025-10-01T18:31:35.420ZApplied to files:
📚 Learning: 2025-12-06T15:03:07.223ZApplied to files:
📚 Learning: 2025-09-28T21:41:45.233ZApplied to files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
🔇 Additional comments (3)
Comment |
|
View your CI Pipeline Execution ↗ for commit 82b4c14
☁️ Nx Cloud last updated this comment at |
Following #6171, it turns out the new index nodes are terminating: they don't need to push a frame onto the stack to walk the children, either they match or they don't.
This makes them slightly less costly to match.
Benchmark without cache: still slightly slower than w/o index nodes, but also consistently better than when pushing index node frames onto the stack.