Skip to content

Commit ad28f24

Browse files
committed
minor adjustments
1 parent 49e7b37 commit ad28f24

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/blog/tanstack-start-ssr-performance-600-percent.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ title: 'From 3000ms to 14ms: CPU profiling of TanStack Start SSR under heavy loa
1414

1515
We improved TanStack Start's SSR performance dramatically. Under sustained load (100 concurrent connections, 30 seconds):
1616

17-
<!-- these are matteo's numbers, they don't lool amazing (low throughput), maybe we should use our own numbers? we'll cite his in the conclusion anyway. -->
17+
<!-- these are matteo's numbers, they don't look amazing (low throughput), maybe we should use our own numbers? we'll cite his in the conclusion anyway. -->
1818

1919
- **Throughput**: 477 req/s → 1,041 req/s (**2.2x**)
2020
- **Average latency**: 3,171ms → 14ms (**231x faster**)
@@ -33,7 +33,7 @@ We did it with a repeatable process, not a single clever trick:
3333
- add server-only fast paths behind a build-time `isServer` flag
3434
- avoid `delete` in performance-sensitive code
3535

36-
The changes span over 20 PRs; we highlight the highest-impact patterns below.
36+
The changes span over [20 PRs](https://github.com/TanStack/router/compare/v1.154.4...v1.157.18); we highlight the highest-impact patterns below.
3737

3838
<!-- the "What we optimized" section and "Methodology" feel a little redundant because "what we optimized" doesn't actually say what we optimized, just *how* we did it, which is part of the methodology. -->
3939

@@ -115,8 +115,8 @@ In our SSR profiles, `URL` construction/parsing showed up as significant self-ti
115115

116116
Use cheap predicates first, then fall back to heavyweight parsing only when needed.
117117

118-
- If a value is clearly internal (eg starts with `/` but not `//`, or starts with `.`), don't try to parse it as an absolute URL.
119-
- If a feature is only needed in edge cases (eg rewrite logic), keep it off the default path.
118+
- If a value is clearly internal (e.g. starts with `/` but not `//`, or starts with `.`), don't try to parse it as an absolute URL.
119+
- If a feature is only needed in edge cases (e.g. rewrite logic), keep it off the default path.
120120

121121
### What we changed
122122

@@ -133,7 +133,7 @@ if (isSafeInternal(to)) {
133133
}
134134
```
135135

136-
The `isSafeInternal` check can be orders of magnitude cheaper than constructing a `URL` object[^url-cost] as long as we're ok with some false negatives in a few cases.
136+
The `isSafeInternal` check can be orders of magnitude cheaper than constructing a `URL` object[^url-cost]. It's meant to be a cheap predicate, so it is okay if some URLs that _would_ be internal are classified as external and go through the slower path.
137137

138138
See: [#6442](https://github.com/TanStack/router/pull/6442), [#6447](https://github.com/TanStack/router/pull/6447), [#6516](https://github.com/TanStack/router/pull/6516)
139139

@@ -280,6 +280,8 @@ Taking the example of the `startViewTransition` method, we can see that the tota
280280

281281
Benchmark: placeholder text, should link to Matteo's article.
282282

283+
<!-- we need to wait for matteo's article to be published to link to it. -->
284+
283285
### Summary
284286

285287
| Metric | Before | After | Improvement |

0 commit comments

Comments
 (0)