Skip to content

Version Packages - #462

Merged
chee merged 1 commit into
mainfrom
changeset-release/main
Oct 24, 2026
Merged

chee merged 1 commit into
mainfrom
changeset-release/main

Conversation

@patchcrow

Copy link
Copy Markdown
Collaborator

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@inkandswitch/patchwork-bootloader@0.8.6

Patch Changes

  • 3585501: A restart of the automerge worker no longer makes every tab look up every package at once. Those lookups reached the worker while it was shutting down, and answering them pushed the replacement over its memory threshold, so it recycled again. That kept the worker restarting about every 30s, with package lookups failing with HTTP 556 until the page was reloaded.

    The sync node's changed now carries its heads for the sedimentree. They're attached only once the tree holds every record that caused the change. Otherwise changed comes without them. The node also answers each watch with the heads it has, so a replacement node tells watchers what it holds, including anything the node before it stored. PortSyncRemote.reconnect() re-sends its watches and no longer calls every watcher.

    These are Subduction's heads, not the document's: once a document has a long history they include ancestors of its automerge heads. So they only say whether anything arrived, never which version to load. watchDocument(url, onChange) calls onChange(seen) with a summary of what the node holds, or with no argument when the node doesn't say. PackageTracker.watch's onChange takes the same optional seen. ModuleWatcher looks a package up when seen changes or is absent, and does nothing when a restarted node says the same as before.

    A reload also waits for its import to finish before the next one starts, so the changes that land meanwhile collapse into one more import at the latest heads.

  • Updated dependencies [3585501]

    • @inkandswitch/patchwork-filesystem@0.2.15

@inkandswitch/patchwork-filesystem@0.2.15

Patch Changes

  • 3585501: A restart of the automerge worker no longer makes every tab look up every package at once. Those lookups reached the worker while it was shutting down, and answering them pushed the replacement over its memory threshold, so it recycled again. That kept the worker restarting about every 30s, with package lookups failing with HTTP 556 until the page was reloaded.

    The sync node's changed now carries its heads for the sedimentree. They're attached only once the tree holds every record that caused the change. Otherwise changed comes without them. The node also answers each watch with the heads it has, so a replacement node tells watchers what it holds, including anything the node before it stored. PortSyncRemote.reconnect() re-sends its watches and no longer calls every watcher.

    These are Subduction's heads, not the document's: once a document has a long history they include ancestors of its automerge heads. So they only say whether anything arrived, never which version to load. watchDocument(url, onChange) calls onChange(seen) with a summary of what the node holds, or with no argument when the node doesn't say. PackageTracker.watch's onChange takes the same optional seen. ModuleWatcher looks a package up when seen changes or is absent, and does nothing when a restarted node says the same as before.

    A reload also waits for its import to finish before the next one starts, so the changes that land meanwhile collapse into one more import at the latest heads.

@github-actions

github-actions Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Benchmarks: Patchwork with this PR against main

32ff672 against main at fd9d3ef, Patchwork as it ships (patchwork mode), measured one after the other on the same runner (run). Lower is better throughout. A row is in the table when every run of the PR came out on the same side of every run of main, with the medians more than 20% apart; every benchmark is below it.

Nothing changed by more than the runs vary.

every benchmark: the median of 3 runs of main and 3 runs of the PR, their range in brackets
benchmark main PR change
boot → repo, first tab (1 tabs) 253 ms (247–259) 266 ms (259–269) +5%
boot → server connected, first tab (1 tabs) 393 ms (376–399) 403 ms (392–428) +2%
renderer memory, all tabs + workers (1 tabs) 413 MB (400–416) 401 MB (386–415) −3%
renderer processes (1 tabs) 3 3
boot → repo, first tab (3 tabs) 281 ms (279–288) 272 ms (264–290) −3%
boot → repo, last tab (3 tabs) 177 ms (173–179) 182 ms (178–187) +3%
boot → server connected, first tab (3 tabs) 526 ms (520–564) 530 ms (526–535) +1%
renderer memory, all tabs + workers (3 tabs) 742 MB (731–749) 755 MB (732–761) +2%
renderer processes (3 tabs) 5 5
boot → repo, first tab (10 tabs) 271 ms (257–275) 267 ms (267–270) −2%
boot → repo, last tab (10 tabs) 195 ms (189–196) 189 ms (186–189) −3%
boot → server connected, first tab (10 tabs) 505 ms (476–568) 511 ms (491–533) +1%
renderer memory, all tabs + workers (10 tabs) 1893 MB (1861–1919) 1892 MB (1889–1940) −0%
renderer processes (10 tabs) 12 12
sync still works after the first tab closes ok ok
edit → seen + confirmed, after first tab closed 61 ms (58–62) 62 ms (59–64) +2%
server link seen down while offline FAIL FAIL
…and the server did not see the offline edits FAIL FAIL
tabs converged while offline, over a local channel ok ok
offline edits in two tabs both survive reconnect ok ok
reconnect → tabs converged (only where they hadn't already) – –
…and a fresh tab sees both ok ok
boot → doc open, tab 1 522 ms (511–526) 527 ms (523–576) +1%
boot → doc open, tab 2 299 ms (299–306) 315 ms (300–317) +5%
boot → doc open, tab 10 295 ms (291–297) 291 ms (289–346) −1%
open 40 tabs, wall clock 9223 ms (9199–9303) 9153 ms (9133–10453) −1%
boot → repo, last of 40 tabs 79 ms (60–80) 77 ms (74–81) −1%
boot → linked, last of 40 tabs – –
boot → server connected, last of 40 tabs 191 ms (188–194) 203 ms (194–215) +6%
renderer memory, 40 tabs 7274 MB (7213–7347) 7251 MB (7223–7313) −0%
renderer processes, 40 tabs 42 42
39 tabs find the doc: median 805 ms (627–845) 840 ms (725–847) +4%
39 tabs find the doc: slowest 908 ms (899–939) 897 ms (891–1012) −1%
…all 39 found it ok ok
…finds that needed a retry (of 39) 0 0
edit → seen in 39 tabs: median tab 37 ms (36–37) 36 ms (36–37) −1%
edit → seen in 39 tabs: slowest tab 72 ms (71–88) 74 ms (71–79) +4%
…tabs that saw every edit (of 39) 39 39
edit → server holds our heads (40 tabs) 155 ms (152–163) 145 ms (135–164) −6%
…server confirmed every edit (40 tabs) ok ok
…longest main-thread stall in tab 0 during the edits 58 ms (53–67) 61 ms (59–66) +5%
sync rounds per sibling edit, non-editing tab 0 0
server bytes received per edit per tab – –
storage writes (saveBatch) per edit per tab – –
worker errors (40 tabs) 0 0
a fresh tab finds a closed tab's doc (no server) ok ok
…time to find it, from storage 47 ms (40–68) 47 ms (42–47)
…and every edit made before the close is in it ok ok
edits from tabs closed right after editing all survive ok ok
…or at least 5s later ok ok
find a doc another tab just created 58 ms (55–75) 56 ms (54–70) −3%
…and every such find() succeeded within 5s ok ok
…and none settled unavailable first ok ok
edit → seen in 2 other tabs 5 ms (5–6) 6 ms (5–6) +1%
…every edit reached every other tab within 5s ok ok
edit → server holds our heads 32 ms (32–32) 33 ms (32–42) +2%
…the server confirmed every edit within 5s ok ok
…and a stranger gets the whole doc from the server ok ok
renderer memory, 1 tab 406 MB (401–413) 409 MB (408–412) +1%
renderer memory, 10 tabs 1856 MB (1851–1943) 1916 MB (1885–1917) +3%

@github-actions

github-actions Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

🪡 Patchwork

Torn down.

@chee
chee merged commit 8758350 into main Oct 24, 2026
10 checks passed
@chee
chee deleted the changeset-release/main branch October 24, 2026 04:30
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