Bad <Link> performance on large datasets
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 rendering a lot of <Link>s at once, some take up to 8ms to render, resulting in ui stutters
Your Example Website or App
https://stackblitz.com/edit/vitejs-vite-q4irqygh
Steps to Reproduce the Bug or Issue
- open the linked repro
- click "show many"
- notice how it takes a bit of time for stuff to render
- 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
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
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