ta
TanStack
GitHub
router
Workspace
GitHub
CI Pipeline Executions
Filtered
Runs
Demo
Insights
Compare tasks
Analytics
Sign in
Toggle sidebar
Overview
⌘K
router
Loading workspace stats
Loading workspace insights...
Statistics interval
7 days
30 days
Latest CI Pipeline Executions
Status
Fix filter
Filter
Fuzzy
Filter range
Sort by
Sort by
Start time
Sort ascending
Sort descending
GitHub
router
Workspace
Succeeded
perf/single-search-validation-lean
cd4d01c2 perf(router-core): stop re-validating search params for buildLocation `buildLocation` asked `matchRoutesLightweight` for the current location's accumulated search, which re-ran every matched route's `validateSearch`. `matchRoutesInternal` already computes that exact value, so it now stamps it on the location it resolved (`_search`) and `matchRoutesLightweight` reads it back. The value is therefore correct by construction - it was computed for that very location object - and the validator loop is only reached for a location that was never matched, such as a freshly built destination. That removes one full validation pass per navigation, three runs per matched route down to two. In the same block, `matchRoutesInternal` now hands the validator the object that becomes the match's search and fills it in place, so a branch allocates one search object per depth instead of three. Measured with zod v4 schemas on a 3-route branch (jsdom, 3000 navigations): 9 -> 6 `validateSearch` calls per navigation, ~73-77us -> ~64-68us. Bundle: react-router.minimal 85807 -> 85827 gzip (+20), react-router.full 89391 -> 89411 gzip (+20). The in-place fill is byte-neutral on its own (+0/+1); the stamp-and-reuse accounts for the whole +20. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01C1tX2n8xegVBsZqoJPu7iv
by Sheraff
S
Previous
Next