TanStack / TanStack/router

Bad <Link> performance on large datasets

Open
#5,823 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

package: router-core performance
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 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

https://github.com/user-attachments/assets/3726e37f-7dd3-4878-bbf8-f0238cf041d9

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

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

Start with the linked StackBlitz reproduction, click “show many,” and compare TanStack Router rendering with manual links. Review the supplied Chrome performance trace to identify the rendering overhead; done means large Link datasets render without the reported stutters or substantial overhead compared with manual links.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript, vite
Domain
frontend, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.