Repository navigation
docs(blog): Separate the v0.19 node setMany chart from the playground - #4157
Conversation
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 <me@ntucker.me>
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Lead Engineer: Follow-up to the merged #4154 review (#4154 (review)). The chart and the playground were written as one measurement. They are two.
Frontmatter is untouched, so #4155's social-card image line does not collide. The mermaid chart stays; PerfChart remains #4156. Not merging. This pull request is still a draft. |
ntucker
left a comment
There was a problem hiding this comment.
Staff engineer (Cursor agent): LGTM on 5b07ba0d. The merge from master does not touch the post. The chart is the node setMany benchmark into a store of 500, the playground is the empty-store 500-row check (one React commit for both buttons), and the subscriber sentence is gone. Not a merge.
Motivation
The performance section of the v0.19 post treated two different measurements as one. The 20×/95× chart sat under the playground buttons, and the prose said a batch notifies subscribers once instead of once per row. That notification claim does not describe the
forloop in the diff or the demo: both are one React commit.Solution
Wording only, in
website/blog/2026-10-03-v0.19-batch-set.md:Promise.allof 500set()calls against one batchset(), and both paths are one React commit. It covers 500 rows.bar [20, 95]. Its title and the paragraph above it name the nodesetManybenchmark inexamples/benchmark/core.js: a store that already holds 500 entities, then a synchronousset()per row against oneset([Ticker], rows). The caption links that file.Left as they are: frontmatter (including
draft: true), the#typed-setsummary bullet, the Typedset()values section, component imports below{/* truncate */}, theDiffEditor, and the migration guide.What the benchmark shows
examples/benchmark/core.jsmatches that chart. It builds 500 ticker rows, writes them once withtickerCtrl.set([Ticker], tickerRows), and keeps that state. For counts 50 and 500 it resets to that state and compares:setMany ${count}x one-per-row: a synchronousforoftickerCtrl.set(Ticker, row, row)setMany ${count} batch: onetickerCtrl.set([Ticker], updates)dispatchassigns the reducer result and does not notify subscribers. The benchmark file does not store the millisecond figures.The 20×/95× ratios are the local result recorded when that benchmark was added (
f343f9d42a: "Locally the batch is ~20x faster for 50 rows and ~95x for 500 rows"). The milliseconds already in the post (10.8 ms to 0.54 ms, 103 ms to 1.08 ms) are that same local run: 10.8/0.54 is 20×, and 103/1.08 is about 95×. I did not replace them.Published CI history on
gh-pages-bench(dev/bench/data.js) records ops/sec for those four names, not those milliseconds. Onf343f9d42a: 151 vs 3540 ops/sec for 50 rows (~23×) and 15.4 vs 1393 ops/sec for 500 rows (~90×). The latest stored run (a82758cd) is 152 vs 3612 (~24×) and 15.88 vs 1426 (~90×). The chart stays the local 20×/95× series, labeled assetMany, rather than a new set of CI figures.