diff --git a/website/blog/2026-10-03-v0.19-batch-set.md b/website/blog/2026-10-03-v0.19-batch-set.md index 5d1b722ef014..a295d9d35c9b 100644 --- a/website/blog/2026-10-03-v0.19-batch-set.md +++ b/website/blog/2026-10-03-v0.19-batch-set.md @@ -74,7 +74,8 @@ no updater function. To batch mixed Entity types, deletes, or rows keyed by id, [Controller.set()](/docs/api/Controller#set-array) for examples. [#4103](https://github.com/reactive/data-client/pull/4103) -Try both buttons below. Each writes 500 new prices; the timer shows how long until the update is committed. +Try both buttons below. This browser check starts from an empty store and times `Promise.all` of 500 `set()` +calls against one batch `set()`. Both paths are one React commit, and each writes 500 new prices. @@ -143,8 +144,13 @@ render(); Each `set()` is a separate store update, and every store update copies that entity type's table. Writing rows one at a time repeats that copy for every row, so the cost grows with both the batch size and the store size. A batch -pays it once, and notifies subscribers once instead of once per row: **20x** faster for 50 rows (10.8 ms to 0.54 ms) -and **95x** faster for 500 rows (103 ms to 1.08 ms), into a store holding 500 entities. +pays that copy once. + +The chart is the node `setMany` benchmark in +[examples/benchmark/core.js](https://github.com/reactive/data-client/blob/master/examples/benchmark/core.js): +a store that already holds 500 entities, then a synchronous `set()` per row against one `set([Ticker], rows)`. +It measures the store update: **20x** faster for 50 rows (10.8 ms to 0.54 ms) and **95x** faster for 500 rows +(103 ms to 1.08 ms). [#4103](https://github.com/reactive/data-client/pull/4103)
@@ -153,7 +159,7 @@ and **95x** faster for 500 rows (103 ms to 1.08 ms), into a store holding 500 en ```mermaid xychart-beta - title "Batch set() speedup vs one set() per row" + title "Node setMany speedup into a 500-entity store" x-axis ["50 rows", "500 rows"] y-axis "Times faster" 0 --> 100 bar [20, 95] @@ -161,7 +167,7 @@ xychart-beta -[Benchmarks over time](https://reactive.github.io/data-client/dev/bench/) | [View benchmark](https://github.com/reactive/data-client/tree/master/examples/benchmark) +[Benchmarks over time](https://reactive.github.io/data-client/dev/bench/) | [View setMany benchmark](https://github.com/reactive/data-client/blob/master/examples/benchmark/core.js)