Skip to content

Bad <Link> performance on large datasets #5823

@teidesu

Description

@teidesu

Which project does this relate to?

Router

Describe the bug

when rendering a lot of <Link>s at once, some take up to 8ms to render, resulting in ui stutters

Image

Your Example Website or App

https://stackblitz.com/edit/vitejs-vite-q4irqygh

Steps to Reproduce the Bug or Issue

  1. open the linked repro
  2. click "show many"
  3. notice how it takes a bit of time for stuff to render
  4. try replacing tanstack router links with simple manual <a> links, notice how everything becomes instant
Screen.Recording.2025-11-12.at.01.54.43.mov

Expected behavior

i expect tanstack router to not have that much of overhead over manual <a> elements with an onClick

Screenshots or Videos

No response

Platform

  • Router / Start Version: 1.135.2
  • OS: macOS (M3 Max)
  • Browser: Chrome
  • Browser Version: 141
  • Bundler: vite
  • Bundler Version: 7.2.2

Additional context

trace from chrome performance tab: Trace-20251112T014637.json

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions