From 009be93c2e8972870c46ae7bf822e6b22bb584ea Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sun, 4 Oct 2026 18:32:31 +0000 Subject: [PATCH] docs(blog): Label the v0.19 set() chart as the node setMany benchmark The 20x/95x chart is the node setMany benchmark in examples/benchmark/core.js. The playground is the empty-store 500-row browser check. Drop the claim that a batch notifies subscribers once instead of once per row. Co-authored-by: Nathaniel Tucker --- website/blog/2026-10-03-v0.19-batch-set.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) 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)