Skip to content

Devtools causes severe performance degradation with many routes in state #6729

@Mando-C137

Description

@Mando-C137

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions