Skip to content

Commit 086353b

Browse files
ci: apply automated fixes
1 parent 59e7b29 commit 086353b

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

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

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
id: ssr-performance-600-percent
3-
title: "From 3000ms to 14ms: profiling hot paths and eliminating bottlenecks in TanStack Start"
3+
title: 'From 3000ms to 14ms: profiling hot paths and eliminating bottlenecks in TanStack Start'
44
---
55

66
## Executive summary
@@ -83,21 +83,23 @@ Placeholders you should replace with real screenshots:
8383
**Environment:**
8484

8585
Our benchmarks were stable enough to produce very similar results on a range of setups. However here are the exact environment details we used to run the benchmarks:
86+
8687
- Node.js: v24.12.0
8788
- Hardware: Macbook Pro M3
8889
- OS: macOS 15.7
8990

9091
**Running the benchmark:**
9192

9293
For fast iteration, we setup a single `pnpm bench` command what would concurrently
94+
9395
- start the built server through `@platformatic/flame` to profile it
94-
```sh
95-
flame run ./dist/server.mjs
96-
```
96+
```sh
97+
flame run ./dist/server.mjs
98+
```
9799
- run `autocannon` to stress the server by firing many requests at it
98-
```sh
99-
autocannon -d 30 -c 100 --warmup [ -d 2 -c 20 ] http://localhost:3000/bench/links-100
100-
```
100+
```sh
101+
autocannon -d 30 -c 100 --warmup [ -d 2 -c 20 ] http://localhost:3000/bench/links-100
102+
```
101103

102104
## Finding 1: `URL` is expensive in server hot paths
103105

@@ -159,7 +161,9 @@ This is the difference between "server = a function" and "client = a reactive sy
159161

160162
```typescript
161163
// Before: same code path for client and server
162-
store.subscribe(() => { /* ... */ }) // overhead on server
164+
store.subscribe(() => {
165+
/* ... */
166+
}) // overhead on server
163167
const next = replaceEqualDeep(prev, value) // unnecessary structural sharing
164168

165169
// After: server gets a simple snapshot
@@ -277,6 +281,9 @@ There were many other improvements (client and server) not covered here. SSR per
277281
## References
278282

279283
[^v8-fast-properties]: V8 team, "Fast properties in V8" `https://v8.dev/blog/fast-properties`
284+
280285
[^webkit-delete-ic]: WebKit, "A Tour of Inline Caching with Delete" `https://webkit.org/blog/10298/inline-caching-delete/`
286+
281287
[^structural-sharing]: Structural sharing is a pattern from immutable data libraries (Immer, React Query, TanStack Store) where unchanged portions of data structures are reused by reference to minimize allocation and enable cheap equality checks.
288+
282289
[^ssr-streaming]: With streaming SSR and Suspense, the server may render multiple chunks, but each chunk is still a single-pass render with no reactive updates.

0 commit comments

Comments
 (0)