TanStack / TanStack/router

Devtools causes severe performance degradation with many routes in state

Open
#6,729 0 comments 0 reactions 0 assignees View on GitHub

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
  1. Visit the page
  2. Navigate the app without the devtools rendered
  3. Render the Devtolls by clicking the Show Devtools-Button
  4. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.