Skip to content

Commit 4e67995

Browse files
committed
measurements explanations
1 parent 3c1e85b commit 4e67995

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

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

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,9 @@ The `isSafeInternal` check can be orders of magnitude cheaper than constructing
131131

132132
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)
133133

134-
### How we proved it internally
134+
### Measuring the improvements
135135

136-
Like every PR in this series, this change was validates by profiling the impacted method before and after. For example we can see in the example below that the `buildLocation` method went from being one of the major bottlenecks of a navigation to being a very small part of the overall cost:
136+
Like every PR in this series, this change was validated by profiling the impacted method before and after. For example we can see in the example below that the `buildLocation` method went from being one of the major bottlenecks of a navigation to being a very small part of the overall cost:
137137

138138
| | |
139139
| ------ | --------------------------------------------------------------------------------------------------------------------------------------- |
@@ -176,7 +176,9 @@ function useRouterState() {
176176

177177
See: [#6497](https://github.com/TanStack/router/pull/6497), [#6482](https://github.com/TanStack/router/pull/6482)
178178

179-
### How we proved it internally
179+
### Measuring the improvements
180+
181+
Taking the example of the `useRouterState` hook, we can see that most of the client-only work was removed from the SSR pass, leading to a ~2x improvement in the total CPU time of this hook.
180182

181183
| | |
182184
| ------ | -------------------------------------------------------------------------------------------------------------------------------------- |
@@ -225,7 +227,9 @@ return generalPath(input)
225227

226228
See: [#4648](https://github.com/TanStack/router/pull/4648), [#6505](https://github.com/TanStack/router/pull/6505), [#6506](https://github.com/TanStack/router/pull/6506)
227229

228-
### How we proved it internally
230+
### Measuring the improvements
231+
232+
Taking the example of the `matchRoutesInternal` method, we can see that its children's total CPU time was reduced by ~25%.
229233

230234
| | |
231235
| ------ | -------------------------------------------------------------------------------------------------------------------------------------- |
@@ -257,7 +261,9 @@ this.shouldViewTransition = undefined
257261

258262
See: [#6456](https://github.com/TanStack/router/pull/6456), [#6515](https://github.com/TanStack/router/pull/6515)
259263

260-
### How we proved it internally
264+
### Measuring the improvements
265+
266+
Taking the example of the `startViewTransition` method, we can see that the total CPU time of this method was reduced by >50%.
261267

262268
| | |
263269
| ------ | ------------------------------------------------------------------------------------------------------------------------------------- |
@@ -306,14 +312,6 @@ The biggest gains came from removing whole categories of work from the server ho
306312

307313
There were many other improvements (client and server) not covered here. SSR performance work is ongoing.
308314

309-
## Fill-in checklist before publishing
310-
311-
- [x] Replace throughput placeholders with final numbers.
312-
- [x] Replace latency placeholders (avg/p90/p95) with final numbers.
313-
- [ ] Insert flamegraph screenshots and annotate the "before" hotspots and "after" removal.
314-
- [ ] Ensure every external claim has a citation and every internal claim has evidence.
315-
- [ ] Add `layouts-26-with-params` benchmark results (if desired).
316-
317315
## References
318316

319317
[^v8-fast-properties]: V8 team, [Fast properties in V8](https://v8.dev/blog/fast-properties). Great article, but 9 years old so things might have changed.

0 commit comments

Comments
 (0)