Performance
Understand the work behind an update
Section titled “Understand the work behind an update”Signal writes invalidate the bindings that read the changed value. A binding compares its result before writing to the DOM. Component functions run when their instances mount. Browser layout and paint are measured separately from the number of DOM writes.
For a list, changing an independent field signal skips array reconciliation. Replacing an array reconciles the keys. Stable keys let a row keep its DOM nodes and lifetime across structural changes. Try the mutation counter to see an isolated text update.
Recorded keyed benchmark
Section titled “Recorded keyed benchmark”The table shows medians from the repository’s local run of js-framework-benchmark, Chrome 154 tag. Time includes browser rendering. The four implementations used the same runner and browser.
Chrome 154.0.8037.92 · linux x64 · Intel(R) Core(TM) Ultra 9 275HX
| Scenario | Mini Reactive | Vanilla JS | Solid | VanJS |
|---|---|---|---|---|
| Create 1,000 rows, ms | 40.9 | 38.2 | 41 | 43.2 |
| Update every tenth row, ms | 22.7 | 20.2 | 23.1 | 42.1 |
| Create 10,000 rows, ms | 488.6 | 360.5 | 388.1 | 461.8 |
| Page memory with 1,000 rows, MiB | 3.05 | 1.86 | 2.67 | 2.31 |
| Page memory after repeated clears, MiB | 1.03 | 0.61 | 0.76 | 6.82 |
ESM: 9.03 kB gzip. IIFE: 8.34 kB gzip.
The measurements describe a synthetic table workload. In this run, Mini Reactive’s partial update was close to Solid’s result, while creating 10,000 rows took more time. The memory rows measure the whole browser page.
From a checkout, pnpm build && pnpm bench records signal-graph timings, subscription memory, and bundle sizes. The browser adapter and raw baseline live in benchmarks/. See development and docs for project checks.