You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/blog/tanstack-start-ssr-performance-600-percent.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ title: 'From 3000ms to 14ms: CPU profiling of TanStack Start SSR under heavy loa
14
14
15
15
We improved TanStack Start's SSR performance dramatically. Under sustained load (100 concurrent connections, 30 seconds):
16
16
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. -->
@@ -33,7 +33,7 @@ We did it with a repeatable process, not a single clever trick:
33
33
- add server-only fast paths behind a build-time `isServer` flag
34
34
- avoid `delete` in performance-sensitive code
35
35
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.
37
37
38
38
<!-- 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. -->
39
39
@@ -115,8 +115,8 @@ In our SSR profiles, `URL` construction/parsing showed up as significant self-ti
115
115
116
116
Use cheap predicates first, then fall back to heavyweight parsing only when needed.
117
117
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.
120
120
121
121
### What we changed
122
122
@@ -133,7 +133,7 @@ if (isSafeInternal(to)) {
133
133
}
134
134
```
135
135
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.
0 commit comments