https://github.com/eser/ssr-benchmark-deno
https://github.com/eser/ssr-benchmark-deno
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/eser/ssr-benchmark-deno
- Owner: eser
- Created: 2024-04-11T04:33:18.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-12T12:42:36.000Z (over 2 years ago)
- Last Synced: 2025-04-08T22:43:58.990Z (over 1 year ago)
- Language: TypeScript
- Size: 32.2 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SSR Framework Benchmark (Deno Edition)
It's a Deno variant of [SSR Framework Benchmark](https://github.com/eknkc/ssr-benchmark) originally developed by [Ekin Koc](https://github.com/eknkc).
The original work is an experiment in response to https://twitter.com/thdxr/status/1777782835249553517 where it is stated that Next.JS is a lot slower on server side rendering compared to Vanilla React.
This is not a comprehensive or scientific test. Just wanted to compare each in a setup a little complex than just printing `hello world`.
## Results
| (idx) | name | ops/sec | average (ms) | margin | samples | relative to preact |
| ----- | ---------- | ------- | ------------------- | -------- | ------- | ------------------ |
| 0 | "preact" | 2321 | 0.43075173565645114 | "±0.45%" | 23216 | |
| 1 | "solid-js" | 464 | 2.1547274624326884 | "±3.24%" | 4645 | "5.00 x slower" |
| 2 | "react" | 190 | 5.249411071916024 | "±0.44%" | 1905 | "12.22 x slower" |
## Test Environment
- Only SSR. We do not even build the client bundles for most of the modules.
- Instead of going through the http server, the benchmark code creates mock http requests and responses. This ensures that we do not pay for tcp overhead.
- Tests ran on Deno `v1.42.1 aarch64-apple-darwin` on my Macbook Pro M1 Max
- Each framework renders a table of 1000 rows, each containing two uuid columns.
- The table data is emulated as asynchronously on respective frameworks.
- Streaming rendering used on react and solid-js.
## Running
```sh
$ deno task start
```