Assigning is free
Assigning 100,000 rows to $state took 0.1 ms and no extra memory. Svelte creates proxies when rows are read, not when you assign.
Putting a big list into $state is free. Reading all of it is not. From about 10,000 rows, a $derived total turns a one-row edit into a full scan through the proxy. And for some edits, $state is the faster choice.
Edit one row, with a $derived total
Assigning 100,000 rows to $state took 0.1 ms and no extra memory. Svelte creates proxies when rows are read, not when you assign.
The first read of every row took 120 ms and 112 MB more heap (100,000 rows). Every $derived total, filter or sort is a full read, on every change.
Editing a row again in a fully rendered list of 100,000: $state 1.8 ms, $state.raw 20 ms. That is why the rule is "make only the rows that change reactive".
Playwright Chromium 153 against node build. One fresh page per configuration, 1 warm-up and 5 measured runs, median shown. Unthrottled, Windows 11, i9-13900KF. Thresholds are machine- and version-specific. Fastest in lime, slowest in red.
| Operation | $state | $state.raw | hybrid | class | SvelteMap |
|---|---|---|---|---|---|
| assign (+ first $derived total) | 153 ms | 0.4 ms | 1.5 ms | 66 ms | 18 ms |
| edit one row, $derived total | 48 ms | 2.2 ms | 3.3 ms | 1.3 ms | 2.1 ms |
| edit it again, full list rendered | 1.8 ms | 20 ms | 2.1 ms | 1.6 ms | 16 ms |
| sort ($state: in place / as a copy) | 453 / 373 ms | 24 ms | 41 ms | 57 ms | n/a |
| filter via $derived | 74 ms | 2.1 ms | 4.6 ms | 17 ms | 1.3 ms |
| heap after a full read | 148 MB | 0.0 | 0.0 | 26 MB | 16 MB |
Hybrid: a raw list where a row becomes reactive on its first edit. Class: rows as class instances with $state fields. At 1,000 rows, the largest difference between variants was 2.0 ms (unthrottled, no full list on screen): choose for readability there.
Your assistant keeps writing the code. The rules tell it which pattern to use and why, in the format it reads: a Claude skill, a Cursor rule, Copilot instructions or AGENTS.md. Every rule names the test that backs it.
Rules 2 and 3 are free in the demo README. The pack adds the rest, templates, an audit prompt, a PR checklist and the tests to run in your own repo.


$state proxy costs. Lazy proxies, full reads, memory, where $state wins.€19 PDF
Base price (bazna cijena) on 16.10.2026: €19
€39 PDF + AI pack
Base price (bazna cijena) on 16.10.2026: €39
€199 up to 10 developers
Base price (bazna cijena) on 16.10.2026: €199
Planned prices. Sales open soon. The waitlist hears first. Season 1 bundle: all four topics, Guide + Measured Rules for €99 (base price (bazna cijena) on 16.10.2026: €99), or any three topics for the price of two. Prices in euro, VAT included. Payment goes through Paddle, the merchant of record; a business can enter its VAT ID at checkout, and reverse charge then applies where the law allows.
One page per topic, every check backed by a measurement: section renderer, ssr state, sveltekit defaults and big lists in svelte 5 state.
After that: one email when the guides open, and a short note when a new measurement is published. Unsubscribe in one click. No confirmation, no emails: the address is deleted within 30 days.
It can quote the Svelte docs: use $state.raw for large data you don't mutate. What it can't tell you is where "large" starts, that assigning is not the cost, and where $state is faster. The rules carry measured thresholds, labelled with machine and versions, and the audit script finds big lists in your own code.
Yes, and I quote it word for word. It says raw avoids the cost of making large data reactive, and that raw state can contain reactive state. I add the numbers: where "large" starts on one machine, why assigning is free, where $state wins, and a measured way to choose which rows are reactive.
True, and you don't have to. In a windowed list, editing one of 250,000 $state rows took 0.1 ms. The cost comes from full reads: $derived totals, filters and sorts over the whole list. Those show at 10,000 rows too.
Right. There is a 4x CPU-throttled run (a rough mid-range phone, not a device measurement), the ratios carry over, and the guide shows how to time your own hot path with a 10-line helper.
Sometimes. They were faster for repeated edits (1.3 vs 2.2 ms per edit at 100,000 rows) and slower when the list is replaced (66 vs 0.4 ms per assign). The guide has the decision rule.
Sales open soon. The waitlist hears first: one email when it opens, and the free big-lists checklist right after you confirm.
2 of 5 sections in the server HTML with {#await import()}
demo public (MIT) · guide soon
Read the measurements →
594 of 600 pages showed another user’s name, 10 requests in flight
demo public (MIT) · guide soon
Read the measurements →
13 server loads for one opened page, reading a list with hover preloading
demo public (MIT) · guide soon
Read the measurements →