Devtools causes severe performance degradation with many routes in state
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.1k
- Forks
- 1.9k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 143
Description
Which project does this relate to?
Router
Describe the bug
When the TanStack Router devtools are rendered (not opened), renders and navigations become slow if the router state contains a large number of routes. This commonly occurs when prerendering or preloading many routes (e.g., for link prefetching (preload"="render" or router.preloadRoute).
In my case, with a significant number of routes in state, the application becomes nearly unusable during development.
Your Example Website or App
https://github.com/Mando-C137/TanstackFaster
Steps to Reproduce the Bug or Issue
- Visit the page
- Navigate the app without the devtools rendered
- Render the Devtolls by clicking the
Show Devtools-Button - Navigate the app with the Devtools rendered
Expected behavior
The devtools should remain performant regardless of router state size.
Screenshots or Videos
No response
Platform
- Router Version: 1.162.2 (latest)
- OS: Windows
- Browser: Chrome, Edge
- Bundler: vite
- Bundler Version: 7.3.1
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the slowdown with the linked TanStack Faster example, comparing navigation with the devtools rendered and absent. Start by tracing devtools rendering alongside router state containing many preloaded routes, including preloadRoute and preload="render"; done means renders and navigations remain performant with large route state.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- developer-experience
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100