Skip to content

fix: performance#363

Merged
lazarv merged 7 commits intomainfrom
fix/performance
Mar 21, 2026
Merged

fix: performance#363
lazarv merged 7 commits intomainfrom
fix/performance

Conversation

@lazarv
Copy link
Copy Markdown
Owner

@lazarv lazarv commented Mar 21, 2026

Performance optimizations across the SSR hot path: byte-level JS string escaping in render-dom.mjs (eliminates TextEncoder/TextDecoder/JSON.stringify churn), streamlined abort signal handling in middleware.mjs (removes per-request DOMException construction), ESM import caching, response streaming pipeline improvements, and static file handler performance fixes

Benchmark suite with autocannon-based harness, 10 route variants (minimal → large SSR, cached, static files, 404), client component SSR counterparts for RSC vs SSR comparison, --cluster mode support, --save/--compare for A/B testing

GitHub Actions workflow for automated benchmark on PRs and main merges with sticky PR comment showing req/s and latency deltas against baseline

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 21, 2026

⚡ Benchmark Results

Commit: 91edc5e | No baseline available (will be created when this PR's target is next pushed to main)

Benchmark Req/s Avg Latency P50 P99 Throughput
minimal 1326 37.16 ms 35 ms 73 ms 0.7 MB/s
small 1469 33.5 ms 33 ms 60 ms 1.3 MB/s
medium 347 143.15 ms 142 ms 216 ms 5.1 MB/s
large 32 1441.63 ms 1433 ms 2650 ms 3.3 MB/s
deep 948 52.11 ms 51 ms 87 ms 3.1 MB/s
wide 44 1113.29 ms 1101 ms 1999 ms 2.4 MB/s
cached 4201 11.38 ms 10 ms 22 ms 61.3 MB/s
client-min 1011 48.78 ms 48 ms 76 ms 2.6 MB/s
client-small 1058 46.7 ms 46 ms 73 ms 3.0 MB/s
client-med 611 80.77 ms 80 ms 120 ms 10.1 MB/s
client-large 95 509.2 ms 509 ms 1019 ms 9.8 MB/s
client-deep 886 55.85 ms 56 ms 81 ms 4.7 MB/s
client-wide 178 277.44 ms 274 ms 475 ms 10.1 MB/s
static-json 8407 5.61 ms 5 ms 14 ms 3.5 MB/s
static-js 7980 5.71 ms 5 ms 15 ms 37.3 MB/s
404-miss 7851 5.7 ms 5 ms 11 ms 1.0 MB/s
Legend

🟢 > 1% improvement | 🔴 > 1% regression | ⚪ within noise margin

Benchmarks run on GitHub Actions runners (shared infrastructure) — expect ~5% variance between runs. Consistent directional changes across multiple routes are more meaningful than any single number.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 21, 2026

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
757 1 756 3
View the top 1 failed test(s) by shortest run time
__test__/deno.spec.mjs > preset: get-started-ts
Stack Traces | 300s run time
Error: Hook timed out in 300000ms.
If this is a long-running hook, pass a timeout value as the last argument or configure it globally with "hookTimeout".
 ❯ __test__/deno.spec.mjs:46:18

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@lazarv lazarv merged commit 7bf374e into main Mar 21, 2026
151 of 154 checks passed
@lazarv lazarv deleted the fix/performance branch March 21, 2026 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants