Skip to content

docs(blog): Separate the v0.19 node setMany chart from the playground - #4157

Merged
ntucker merged 2 commits into
masterfrom
cursor/v019-bench-wording-4880
Oct 4, 2026
Merged

ntucker merged 2 commits into
masterfrom
cursor/v019-bench-wording-4880

Conversation

@ntucker

@ntucker ntucker commented Oct 4, 2026

Copy link
Copy Markdown
Collaborator

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 for loop 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:

  • The playground intro is the empty-store browser check: it starts empty, times Promise.all of 500 set() calls against one batch set(), and both paths are one React commit. It covers 500 rows.
  • The mermaid chart stays bar [20, 95]. Its title and the paragraph above it name the node setMany benchmark in examples/benchmark/core.js: a store that already holds 500 entities, then a synchronous set() per row against one set([Ticker], rows). The caption links that file.
  • The subscriber-notification sentence is removed.

Left as they are: frontmatter (including draft: true), the #typed-set summary bullet, the Typed set() values section, component imports below {/* truncate */}, the DiffEditor, and the migration guide.

What the benchmark shows

examples/benchmark/core.js matches that chart. It builds 500 ticker rows, writes them once with tickerCtrl.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 synchronous for of tickerCtrl.set(Ticker, row, row)
  • setMany ${count} batch: one tickerCtrl.set([Ticker], updates)

dispatch assigns 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. On f343f9d42a: 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 as setMany, rather than a new set of CI figures.

Open in Web Open in Cursor 

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>
@changeset-bot

changeset-bot Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 5b07ba0

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel

vercel Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs-site Ready Ready Preview Oct 4, 2026 6:38pm UTC

Request Review

ntucker commented Oct 4, 2026

Copy link
Copy Markdown
Collaborator Author

Lead Engineer:

Follow-up to the merged #4154 review (#4154 (review)). The chart and the playground were written as one measurement. They are two.

  • The mermaid chart stays bar [20, 95]. It is the node setMany benchmark in examples/benchmark/core.js: a store that already holds 500 entities, then a synchronous set() per row against one set([Ticker], rows). Those ratios are the local run recorded when the benchmark was added. The milliseconds already in the post match that run. Published CI history stores ops/sec instead: about 23× and 90× when the benchmark landed, and about 24× and 90× on the latest stored run. The chart was not switched to those CI figures.
  • The playground intro is the empty-store browser check: Promise.all of 500 set() calls against one batch, both one React commit.
  • The subscriber-notification sentence is gone.

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
ntucker marked this pull request as ready for review October 4, 2026 18:33

@ntucker ntucker left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@ntucker
ntucker merged commit 37d67a5 into master Oct 4, 2026
21 of 22 checks passed
@ntucker
ntucker deleted the cursor/v019-bench-wording-4880 branch October 4, 2026 18:38

This branch was successfully deployed

1 active deployment
Preview — 5b07ba0d Deployed Oct 4, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants