• Stars
    star
    473
  • Rank 92,832 (Top 2 %)
  • Language
    TypeScript
  • Created over 2 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Test each framework for it's performance cost

Framework Benchmarks

Test each framework for it's performance, particularly common Lighthouse and CWV metrics as applications scale

Important: This is not a measure of "is framework x better than y". There are many tradeoffs to weigh when choosing the best framework for you - such as DX, features, familiarity, ecosystem, documentation, etc. These benchmarks only show a part of the picture.

Goals

The goal for this project are to understand the performance tradeoffs of popular frameworks in real world-ish scenarios. We want to assume non trivial codebases and imperfect code and conditions, so to see how each framework holds up to real world scenarios and scale.

We are intentionally not focused on client side rendering performance, for that please use Stefan Krause's great js-framework-benchmark

Status

This project is in initial development. Do not put too much weight on these current results, there is still much more to do to ensure accuracy, consistency, and fairness.

Contributions are welcome!

How it works

Methodology

We created a basic starting point for each framework in the frameworks/ folder using each framework's suggested starter/cli.

We then create basic example components and use Mitosis to compile them to best-effort idiomatic code for each framework. This will never be perfectly optimized code

We then build and serve each project, and run Lighthouse on each project with puppeteer, including with emulation of slow devices and networks (aka includes CPU and network throttling), and measure:

  • FCP: First Contentful Paint (lower is better)
  • LCP: Largest Contentful Paint (lower is better)
  • TBT: Total Blocking Time (lower is better)
  • TTI: Time to Interactive (lower is better)
  • Score: Lighthouse Performance Score (higher is better)
  • Eager JS Kib: the KiB of JS that is eagerly downloaded and executed from <script> tags for the initial page load. This is the actual size transferred over the network, including compression (lower is better)
  • Total KiB: the total KiB transferred with the given page, including HTML, CSS, prefetched resources, etc. Also known as the "total byte weight". This is the actual size transferred over the network, including compression (lower is better)

We take the median of multiple runs, and sort the results by TTI, ascending

We are also experimenting with looking at other metrics, such as build times

The Frameworks

Alphabetically:

  • astro - generated via their official CLI, with Solid for the interactive parts. Source
  • fresh - generated via their official CLI. Source
  • gatsby - contributed by the Gatsby team. Source
  • hydrogen - generated via their official CLI. Source
  • lit - generated via their official starter. Source
  • marko - generated via their official CLI. Source
  • next - generated via their official CLI. Source
  • nuxt2 - generated via their official CLI. Source
  • nuxt3 - generated via their official CLI (in beta). Source
  • qwik - generated with Qwik City (meta framework). Source
  • react - generated from create-react-app with react-router-dom added for routing. Source
  • react-ssr-node - Ultra simple Node server to server-side render react. Source
  • react-ssr-deno - Ultra simple Deno server to server-side render react. Source
  • react-ssr-bun - Ultra simple Bun server to server-side render react. Source
  • preact-ssr-node - Ultra simple Node server to server-side render preact. Source
  • remix - generated from create-remix. Currently excluded from Lighthouse tests by request from the team, from concerns about the code being too non-idiomatic. Source
  • solid - generated with Solid Start (meta framework). Source
  • svelte - generated with Svelte Kit (meta framework). Source
  • vue3 - generated via their official CLI, with routing. Source

Sample output

Important: This project is still in initial development. Do not put too much weight on these current results, there is still much more to do to ensure accuracy, consistency, and fairness.

Jump to:

Dashboard:

A more feature rich app for displaying table data, sorting, filtering, etc. Uses more JS, more like a median website. Source

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ (index) β”‚    name    β”‚   TTI    β”‚   FCP    β”‚   LCP    β”‚   TBT    β”‚ Score β”‚ Eager JS KiB β”‚ Total KiB β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚    0    β”‚   'qwik'   β”‚ '0.6 s'  β”‚ '0.6 s'  β”‚ '1.5 s'  β”‚  '0 ms'  β”‚  100  β”‚      2       β”‚    38     β”‚
β”‚    1    β”‚  'react'   β”‚ '0.8 s'  β”‚ '0.8 s'  β”‚ '2.4 s'  β”‚  '0 ms'  β”‚  98   β”‚     187      β”‚    199    β”‚
β”‚    2    β”‚  'gatsby'  β”‚ '0.8 s'  β”‚ '0.8 s'  β”‚ '1.4 s'  β”‚  '0 ms'  β”‚  100  β”‚      82      β”‚    87     β”‚
β”‚    3    β”‚   'lit'    β”‚ '0.8 s'  β”‚ '0.8 s'  β”‚ '1.1 s'  β”‚  '0 ms'  β”‚  100  β”‚      23      β”‚    25     β”‚
β”‚    4    β”‚  'solid'   β”‚ '0.9 s'  β”‚ '0.6 s'  β”‚ '1.3 s'  β”‚  '0 ms'  β”‚  85   β”‚      24      β”‚    28     β”‚
β”‚    5    β”‚  'astro'   β”‚ '0.9 s'  β”‚ '0.9 s'  β”‚ '1.1 s'  β”‚  '0 ms'  β”‚  100  β”‚      15      β”‚    35     β”‚
β”‚    6    β”‚  'marko'   β”‚ '1.0 s'  β”‚ '0.8 s'  β”‚ '0.9 s'  β”‚ '10 ms'  β”‚  100  β”‚      24      β”‚    33     β”‚
β”‚    7    β”‚  'fresh'   β”‚ '1.3 s'  β”‚ '1.3 s'  β”‚ '1.5 s'  β”‚  '0 ms'  β”‚  100  β”‚      17      β”‚    46     β”‚
β”‚    8    β”‚   'next'   β”‚ '1.6 s'  β”‚ '0.6 s'  β”‚ '1.2 s'  β”‚ '10 ms'  β”‚  100  β”‚      91      β”‚    103    β”‚
β”‚    9    β”‚  'svelte'  β”‚ '1.6 s'  β”‚ '1.6 s'  β”‚ '1.7 s'  β”‚  '0 ms'  β”‚  99   β”‚      29      β”‚    35     β”‚
β”‚   10    β”‚ 'angular'  β”‚ '1.7 s'  β”‚ '1.5 s'  β”‚ '1.5 s'  β”‚ '150 ms' β”‚  98   β”‚      86      β”‚    88     β”‚
β”‚   11    β”‚  'nuxt3'   β”‚ '1.7 s'  β”‚ '1.7 s'  β”‚ '1.7 s'  β”‚  '0 ms'  β”‚  99   β”‚      59      β”‚    65     β”‚
β”‚   12    β”‚   'vue3'   β”‚ '1.8 s'  β”‚ '1.2 s'  β”‚ '2.1 s'  β”‚  '0 ms'  β”‚  94   β”‚      41      β”‚    50     β”‚
β”‚   13    β”‚  'nuxt2'   β”‚ '2.1 s'  β”‚ '1.2 s'  β”‚ '2.1 s'  β”‚ '70 ms'  β”‚  98   β”‚     106      β”‚    118    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Todo App:

A very simple/trivial interactive Todo app. Source

Ordered by TTI, ascending:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ (index) β”‚    name    β”‚   TTI   β”‚   FCP   β”‚   LCP   β”‚   TBT    β”‚ Score β”‚ Eager JS KiB β”‚ Total KiB β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚    0    β”‚  'astro'   β”‚ '0.6 s' β”‚ '0.6 s' β”‚ '0.6 s' β”‚  '0 ms'  β”‚  100  β”‚      20      β”‚    32     β”‚
β”‚    1    β”‚   'qwik'   β”‚ '0.7 s' β”‚ '0.7 s' β”‚ '1.2 s' β”‚  '0 ms'  β”‚  100  β”‚      2       β”‚    25     β”‚
β”‚    2    β”‚  'react'   β”‚ '0.8 s' β”‚ '0.8 s' β”‚ '2.2 s' β”‚  '0 ms'  β”‚  99   β”‚     159      β”‚    171    β”‚
β”‚    3    β”‚  'fresh'   β”‚ '0.8 s' β”‚ '0.8 s' β”‚ '0.9 s' β”‚  '0 ms'  β”‚  100  β”‚      9       β”‚    37     β”‚
β”‚    4    β”‚   'lit'    β”‚ '0.8 s' β”‚ '0.8 s' β”‚ '1.1 s' β”‚  '0 ms'  β”‚  100  β”‚      16      β”‚    18     β”‚
β”‚    5    β”‚  'solid'   β”‚ '1.0 s' β”‚ '0.7 s' β”‚ '1.3 s' β”‚ '40 ms'  β”‚  86   β”‚      17      β”‚    19     β”‚
β”‚    6    β”‚  'marko'   β”‚ '1.1 s' β”‚ '0.8 s' β”‚ '0.9 s' β”‚ '10 ms'  β”‚  100  β”‚      17      β”‚    23     β”‚
β”‚    7    β”‚   'vue3'   β”‚ '1.2 s' β”‚ '1.2 s' β”‚ '1.8 s' β”‚ '10 ms'  β”‚  99   β”‚      33      β”‚    41     β”‚
β”‚    8    β”‚  'svelte'  β”‚ '1.5 s' β”‚ '1.5 s' β”‚ '1.5 s' β”‚  '0 ms'  β”‚  100  β”‚      19      β”‚    24     β”‚
β”‚    9    β”‚  'nuxt3'   β”‚ '1.5 s' β”‚ '1.5 s' β”‚ '1.7 s' β”‚  '0 ms'  β”‚  99   β”‚      50      β”‚    55     β”‚
β”‚   10    β”‚  'gatsby'  β”‚ '1.6 s' β”‚ '0.8 s' β”‚ '1.1 s' β”‚  '0 ms'  β”‚  100  β”‚      70      β”‚    75     β”‚
β”‚   11    β”‚  'nuxt2'   β”‚ '1.6 s' β”‚ '1.0 s' β”‚ '1.0 s' β”‚ '40 ms'  β”‚  100  β”‚      95      β”‚    106    β”‚
β”‚   12    β”‚ 'angular'  β”‚ '1.6 s' β”‚ '1.5 s' β”‚ '1.6 s' β”‚ '30 ms'  β”‚  99   β”‚      72      β”‚    74     β”‚
β”‚   13    β”‚   'next'   β”‚ '2.2 s' β”‚ '0.7 s' β”‚ '0.8 s' β”‚ '110 ms' β”‚  99   β”‚      83      β”‚    94     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Hello World:

Just a few links and <h1>Hello World</h1>. Source

Ordered by TTI, ascending:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ (index) β”‚    name    β”‚   TTI   β”‚   FCP   β”‚   LCP   β”‚   TBT    β”‚ Score β”‚ Eager JS KiB β”‚ Total KiB β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚    0    β”‚   'qwik'   β”‚ '0.7 s' β”‚ '0.7 s' β”‚ '0.7 s' β”‚  '0 ms'  β”‚  100  β”‚      0       β”‚     4     β”‚
β”‚    1    β”‚  'astro'   β”‚ '0.7 s' β”‚ '0.7 s' β”‚ '0.7 s' β”‚  '0 ms'  β”‚  100  β”‚      0       β”‚     9     β”‚
β”‚    2    β”‚  'react'   β”‚ '0.8 s' β”‚ '0.8 s' β”‚ '2.2 s' β”‚  '0 ms'  β”‚  99   β”‚     154      β”‚    166    β”‚
β”‚    3    β”‚  'fresh'   β”‚ '0.8 s' β”‚ '0.8 s' β”‚ '0.8 s' β”‚  '0 ms'  β”‚  100  β”‚      0       β”‚    27     β”‚
β”‚    4    β”‚  'marko'   β”‚ '0.8 s' β”‚ '0.8 s' β”‚ '1.1 s' β”‚  '0 ms'  β”‚  100  β”‚      15      β”‚    21     β”‚
β”‚    5    β”‚   'lit'    β”‚ '0.8 s' β”‚ '0.6 s' β”‚ '0.9 s' β”‚ '10 ms'  β”‚  100  β”‚      15      β”‚    16     β”‚
β”‚    6    β”‚  'solid'   β”‚ '0.9 s' β”‚ '0.9 s' β”‚ '1.1 s' β”‚  '0 ms'  β”‚  100  β”‚      16      β”‚    18     β”‚
β”‚    7    β”‚   'vue3'   β”‚ '1.2 s' β”‚ '1.2 s' β”‚ '1.5 s' β”‚  '0 ms'  β”‚  100  β”‚      31      β”‚    38     β”‚
β”‚    8    β”‚  'gatsby'  β”‚ '1.4 s' β”‚ '0.6 s' β”‚ '1.0 s' β”‚  '0 ms'  β”‚  100  β”‚      69      β”‚    73     β”‚
β”‚    9    β”‚  'svelte'  β”‚ '1.5 s' β”‚ '1.5 s' β”‚ '1.5 s' β”‚  '0 ms'  β”‚  100  β”‚      18      β”‚    22     β”‚
β”‚   10    β”‚  'nuxt2'   β”‚ '1.5 s' β”‚ '0.9 s' β”‚ '0.9 s' β”‚ '120 ms' β”‚  99   β”‚      93      β”‚    103    β”‚
β”‚   11    β”‚  'nuxt3'   β”‚ '1.5 s' β”‚ '1.5 s' β”‚ '1.7 s' β”‚  '0 ms'  β”‚  99   β”‚      50      β”‚    57     β”‚
β”‚   12    β”‚ 'angular'  β”‚ '1.7 s' β”‚ '1.5 s' β”‚ '1.5 s' β”‚ '150 ms' β”‚  98   β”‚      72      β”‚    74     β”‚
β”‚   13    β”‚ 'hydrogen' β”‚ '1.8 s' β”‚ '0.6 s' β”‚ '1.6 s' β”‚ '30 ms'  β”‚  91   β”‚     160      β”‚    172    β”‚
β”‚   14    β”‚   'next'   β”‚ '2.1 s' β”‚ '0.7 s' β”‚ '0.8 s' β”‚ '40 ms'  β”‚  100  β”‚      82      β”‚    93     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

SSR times:

Time it took to server-side render the /dashboard page in milliseconds. Smaller numbers are better.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ (index) β”‚    name    β”‚ 1%  β”‚ 50% β”‚ 99% β”‚  Avg   β”‚ Std Dev β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚    0    β”‚  'marko'   β”‚  1  β”‚  1  β”‚  4  β”‚  1.29  β”‚   0.8   β”‚
β”‚    1    β”‚  'fresh'   β”‚  4  β”‚  4  β”‚  6  β”‚  4.19  β”‚  0.88   β”‚
β”‚    2    β”‚ 'hydrogen' β”‚  4  β”‚  5  β”‚ 14  β”‚  5.63  β”‚  4.39   β”‚
β”‚    3    β”‚  'svelte'  β”‚  6  β”‚  7  β”‚ 18  β”‚  8.17  β”‚  3.12   β”‚
β”‚    4    β”‚  'solid'   β”‚  6  β”‚  8  β”‚ 22  β”‚  8.77  β”‚   3.8   β”‚
β”‚    5    β”‚  'nuxt3'   β”‚ 19  β”‚ 25  β”‚ 68  β”‚ 29.49  β”‚  18.09  β”‚
β”‚    6    β”‚  'nuxt2'   β”‚ 11  β”‚ 14  β”‚ 32  β”‚ 15.04  β”‚  4.89   β”‚
β”‚    7    β”‚  'astro'   β”‚ 11  β”‚ 14  β”‚ 38  β”‚ 16.56  β”‚  5.98   β”‚
β”‚    8    β”‚  'remix'   β”‚ 12  β”‚ 18  β”‚ 62  β”‚  20.3  β”‚  8.87   β”‚
β”‚    9    β”‚  'gatsby'  β”‚ 27  β”‚ 33  β”‚ 103 β”‚  36.9  β”‚  12.86  β”‚
β”‚   10    β”‚   'next'   β”‚ 35  β”‚ 40  β”‚ 113 β”‚ 46.96  β”‚  19.06  β”‚
β”‚   11    β”‚ 'angular'  β”‚ 113 β”‚ 127 β”‚ 400 β”‚ 141.73 β”‚  47.64  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

SSR throughput (req/second):

SSR throughput of the dashboard page, measured by autocannon, sorted by 99% percentile descending. Larger numbers are better.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ (index) β”‚        name       β”‚  1%  β”‚ 50%  β”‚ 99%  β”‚   Avg   β”‚ Std Dev β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚    0    β”‚      'marko'      β”‚ 3677 β”‚ 5411 β”‚ 5951 β”‚ 5263.1  β”‚ 702.18  β”‚
β”‚    1    β”‚      'fresh'      β”‚ 1748 β”‚ 2057 β”‚ 2123 β”‚ 1997.73 β”‚ 117.92  β”‚
β”‚    2    β”‚ 'preact-ssr-node' β”‚ 1755 β”‚ 2065 β”‚ 2185 β”‚ 2052.6  β”‚ 115.11  β”‚
β”‚    3    β”‚     'hydrogen'    β”‚ 843  β”‚ 1653 β”‚ 1807 β”‚ 1528.1  β”‚ 290.27  β”‚
β”‚    4    β”‚      'svelte'     β”‚ 536  β”‚ 820  β”‚ 1107 β”‚  795.3  β”‚ 182.24  β”‚
β”‚    5    β”‚      'solid'      β”‚ 534  β”‚ 842  β”‚ 1019 β”‚ 830.64  β”‚ 138.46  β”‚
β”‚    6    β”‚      'astro'      β”‚ 444  β”‚ 573  β”‚ 641  β”‚   579   β”‚  56.1   β”‚
β”‚    7    β”‚      'nuxt2'      β”‚ 384  β”‚ 550  β”‚ 588  β”‚  539.8  β”‚  54.2   β”‚
β”‚    8    β”‚      'nuxt3'      β”‚ 229  β”‚ 344  β”‚ 411  β”‚  335.3  β”‚  45.62  β”‚
β”‚    9    β”‚      'remix'      β”‚ 264  β”‚ 371  β”‚ 485  β”‚  387.9  β”‚  69.16  β”‚
β”‚   10    β”‚      'gatsby'     β”‚ 158  β”‚ 233  β”‚ 277  β”‚  239.6  β”‚  34.64  β”‚
β”‚   11    β”‚       'next'      β”‚ 142  β”‚ 206  β”‚ 233  β”‚  203.7  β”‚  24.71  β”‚
β”‚   12    β”‚     'angular'     β”‚  45  β”‚  72  β”‚  76  β”‚  69.91  β”‚  8.61   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

React SSR throughput:

Measure Node vs Bun vs Deno at SSR speed of a non trivial (the dashboard) React app. The below is requests per second. Larger numbers are better.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€ ─┬─────────┐
β”‚ (index) β”‚       name        β”‚  1%  β”‚ 50%  β”‚ 99%  β”‚  Avg   β”‚ Std Dev β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”Όβ”€ ────┼────────┼──────────
β”‚    0    β”‚ 'preact-ssr-node' β”‚ 1755 β”‚ 2065 β”‚ 2185 β”‚ 2052.6 β”‚ 115.11  β”‚
β”‚    1    β”‚ 'react-ssr-bun'   β”‚ 500  β”‚ 669  β”‚ 718  β”‚ 650.8  β”‚  71.7   β”‚
β”‚    2    β”‚ 'react-ssr-deno'  β”‚ 550  β”‚ 600  β”‚ 630  β”‚  601   β”‚  20.89  β”‚
β”‚    3    β”‚ 'react-ssr-node'  β”‚ 267  β”‚ 375  β”‚ 394  β”‚ 366.5  β”‚  35.04  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

The above uses Bun version 0.1.10, Deno version 1.25.0, Node.js version 16.14.0. Run on a 2.6 GHz 6-Core Intel Core i7.

Build times:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ (index) β”‚    Name    β”‚ Build Time (Seconds) β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚    0    β”‚   'fresh'  β”‚          0           β”‚
β”‚    1    β”‚   'vue3'   β”‚         3.5          β”‚
β”‚    2    β”‚   'react'  β”‚         7.4          β”‚
β”‚    3    β”‚  'svelte'  β”‚         7.7          β”‚
β”‚    4    β”‚   'qwik'   β”‚         7.7          β”‚
β”‚    5    β”‚   'next'   β”‚         7.8          β”‚
β”‚    6    β”‚   'astro'  β”‚         7.9          β”‚
β”‚    7    β”‚ 'hydrogen' β”‚         8.4          β”‚
β”‚    8    β”‚    'lit'   β”‚         8.4          β”‚
β”‚    9    β”‚  'gatsby'  β”‚         9.9          β”‚
β”‚   10    β”‚  'angular' β”‚         10.7         β”‚
β”‚   11    β”‚   'nuxt2'  β”‚         12.8         β”‚
β”‚   12    β”‚   'solid'  β”‚         12.9         β”‚
β”‚   13    β”‚   'nuxt3'  β”‚          16          β”‚
β”‚   14    β”‚   'marko'  β”‚         16.2         β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Roadmap

Next things we want to add:

  • More complex examples that more closesly emulate real world sites and apps (e.g. a dashboard for exploring the test run results in interactive tables and graphs)
  • Test interaction delays - such as initial interaction (like add todo) or navigate to next page
  • Move test running to be remote, such as in GH actions (Help wanted!)
  • Benchmark SSR speeds. Also add Bun here.
  • Benchmark with and without Partytown for 3P scripts (and vs none at all)

Contributions welcome!

Running locally

Prereqs

You will need Node.js >= 16.14.0k Deno installed locally, and Bun installed locally

Setup

After cloning this repo, install dependencies:

npm install

Now you can start running the below scripts:

Install

Use the install script to install dependencies of each framework:

npm run fw-install

Generate

First, we must generate the component code for each framework via Mitosis.

cd apps/components
npm install
npm run build

Build

Use the build script to build all frameworks (be sure to install first as described above):

npm run build

Measure

To measure the weight of each framework (after you ran install and build):

npm run measure

Credit and Inspiration

More Repositories

1

qwik

Instant-loading web apps, without effort
TypeScript
20,052
star
2

gpt-crawler

Crawl a site to generate knowledge files to create your own custom GPT from a URL
TypeScript
18,484
star
3

partytown

Relocate resource intensive third-party scripts off of the main thread and into a web worker. πŸŽ‰
TypeScript
12,971
star
4

mitosis

Write components once, run everywhere. Compiles to React, Vue, Qwik, Solid, Angular, Svelte, and more.
TypeScript
12,266
star
5

builder

Visual Development for React, Vue, Svelte, Qwik, and more
TypeScript
7,258
star
6

ai-shell

A CLI that converts natural language to shell commands.
TypeScript
4,068
star
7

figma-html

Builder.io for Figma: AI generation, export to code, import from web
TypeScript
3,117
star
8

micro-agent

An AI agent that writes (actually useful) code for you
TypeScript
2,663
star
9

gpt-assistant

An experiment to give an autonomous GPT agent access to a browser and have it accomplish tasks
TypeScript
512
star
10

hydration-overlay

Overlay for hydration errors with explicit diff between renders.
CSS
477
star
11

nextjs-shopify

The ultimate starter for headless Shopify stores
TypeScript
441
star
12

vscode

Builder.io for VSCode - turn designs into code!
TypeScript
174
star
13

SSDiff

TypeScript
139
star
14

build.

A new visual programming language that reads and writes Typescript and Javascript
TypeScript
128
star
15

builder-shopify-hydrogen

Builder.io Visual CMS + page builder example with Shopify Hydrogen
TypeScript
77
star
16

gatsby-starter-builder

Gatsby example with drag and drop page building
JavaScript
68
star
17

nextjs-edge-personalization-ab-testing

High performance personalization & a/b testing example using Next.js, Edge Middleware, and Builder.io
TypeScript
58
star
18

snap

The fastest web framework
TypeScript
50
star
19

ts-lite

Compiled TypeScript. Generates Go, Swift, Kotlin, WASM, Binary
JavaScript
50
star
20

gatsby-builder-shopify

A starter for Gatsby + Shopify + Builder.io
TypeScript
32
star
21

qwik-city-build

`@builder.io/qwik-city` build artifacts from https://github.com/organizations/BuilderIO/qwik
JavaScript
25
star
22

qwik-tw-vercel-starter-kit

A starter kit for Qwik on Vercel
TypeScript
19
star
23

demo-editor

JavaScript
12
star
24

nextjs-builder-edge-personalization

TypeScript
11
star
25

nextjs-builder-starter

TypeScript
11
star
26

edge-personalize

Personalize and a/b test your static pages at the edge. Static speed with dynamic optimizations!
TypeScript
9
star
27

headlessapp.store

TypeScript
8
star
28

react-design-system-demo

JavaScript
8
star
29

sfcc-composable-storefront-example

SFCC + Builder.io Composable Storefront
JavaScript
8
star
30

qwik-city-e2e

Use to test Qwik City on each server
HTML
6
star
31

qwik-docs-es

TypeScript
6
star
32

this-package-uses-fetch

6
star
33

qwik-build

Build artifacts from https://github.com/organizations/BuilderIO/qwik
JavaScript
6
star
34

blog-example

Builder.io blog example
JavaScript
6
star
35

jsx-qwik-worker-post

A repo showing worker$
JavaScript
6
star
36

perf-experiments

Performance experiments
Astro
6
star
37

http-debug-proxy

This project contains a set up to create a HTTP proxy for the https://cdn.builder.io/ endpoint.
JavaScript
6
star
38

qwik-react-framer-motion

A demo for React Framer Motion inside a Qwik application
TypeScript
5
star
39

resumable-react-post

The code for the blog post: "Resumable React: How To Use React Inside Qwik"
TypeScript
5
star
40

builder-fiddle-demos

Demos of fun stuff for Builder fiddles
TypeScript
5
star
41

nextjs-app-router-example

TypeScript
5
star
42

vcp-design-systems-examples

Starters for experimenting with VCP and different design systems
TypeScript
5
star
43

builder-qwik-example

An example project using Builder.io's drag and drop headless CMS with Qwik
TypeScript
4
star
44

personalization-utils

TypeScript
3
star
45

mitosis-build

Build artifacts from https://github.com/BuilderIO/mitosis
3
star
46

qwik-create-cli-build

JavaScript
3
star
47

kibocommerce-nextjs-starter

A KiboCommerce + Builder.io store built on NextJS
TypeScript
3
star
48

builder-swift

Swift SDK for Builder.io
Swift
3
star
49

nextjs-elasticpath

TypeScript
2
star
50

qwik-raw-data

1
star
51

qase-for-qwik

A demo repo to showcase Qwik
TypeScript
1
star
52

gatsby-builder-transform-images

JavaScript
1
star
53

block-publish

CLI tool to block directly using npm publish
JavaScript
1
star
54

qwik-docs

WIP Qwik-docs
JavaScript
1
star
55

unified-demo

Unified Demo of builder use cases with next.js app router
TypeScript
1
star
56

qwik-labs-build

Continues build artifacts
JavaScript
1
star