Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion src/blog/tanstack-router-route-matching-tree-rewrite.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ authors:
- Florian Pellet
---

![Big performance number](/blog-assets/tanstack-router-route-matching-tree-rewrite/header.png)
![Fantasy landscape illustration used as the article header](/blog-assets/tanstack-router-route-matching-tree-rewrite/header.jpg)

We achieved a 20,000× performance improvement in route matching in TanStack Router. Let's be honest, this is _definitely_ cherry-picked, but the number is real and comes from a real production application. More importantly, it shows that matching a pathname to a route is no longer bottlenecked by the number of routes in your application.

![Big performance number](/blog-assets/tanstack-router-route-matching-tree-rewrite/big-number.png)

## The Real Problem: correctness, not speed

One big responsibility of a router is to match a given URL pathname (e.g., `/users/123`) to a route definition (e.g., `/users/$userId`). This is deceptively complex when you consider all the different types of route segments (static, dynamic, optional, wildcard) and the priority rules that govern which route should match first.
Expand Down
Loading