-
-
Notifications
You must be signed in to change notification settings - Fork 307
Fix blog route matching article header #769
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
2058dab
c1d0ffa
d660019
7f80431
6166e18
6964b7c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,10 +6,12 @@ authors: | |
| - Florian Pellet | ||
| --- | ||
|
|
||
|  | ||
|  | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use meaningful alt text (or empty alt if decorative). On Line 9, 🤖 Prompt for AI Agents |
||
|
|
||
| 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. | ||
|
|
||
|  | ||
|
|
||
| ## 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. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new top-of-article image points to
header.png, which in this commit is a 3,391,000-byte PNG (public/blog-assets/tanstack-router-route-matching-tree-rewrite/header.png), roughly 100× larger than the previous header asset. Because this image is rendered at the start of the post, every reader pays this transfer cost up front, which will noticeably hurt page load/LCP on slower networks; please resize/compress or switch to a more efficient format before using it as the header.Useful? React with 👍 / 👎.