Skip to content

only treat new heads as new heads - #461

Merged
chee merged 5 commits into
mainfrom
stop-being-a-melt
Oct 24, 2026
Merged

chee merged 5 commits into
mainfrom
stop-being-a-melt

Conversation

@chee

@chee chee commented Oct 23, 2026

Copy link
Copy Markdown
Member

No description provided.

@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Benchmarks: Patchwork with this PR against main

f7a4344 against main at ccb32c6, 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) 281 ms (265–283) 261 ms (257–281) −7%
boot → server connected, first tab (1 tabs) 658 ms (639–658) 640 ms (639–656) −3%
renderer memory, all tabs + workers (1 tabs) 402 MB (397–411) 401 MB (400–411) −0%
renderer processes (1 tabs) 3 3
boot → repo, first tab (3 tabs) 287 ms (277–294) 285 ms (271–300) −1%
boot → repo, last tab (3 tabs) 204 ms (195–206) 202 ms (200–209) −1%
boot → server connected, first tab (3 tabs) 746 ms (731–888) 755 ms (705–778) +1%
renderer memory, all tabs + workers (3 tabs) 739 MB (734–753) 750 MB (728–751) +1%
renderer processes (3 tabs) 5 5
boot → repo, first tab (10 tabs) 257 ms (243–274) 267 ms (256–273) +4%
boot → repo, last tab (10 tabs) 201 ms (199–203) 191 ms (181–211) −5%
boot → server connected, first tab (10 tabs) 841 ms (736–876) 778 ms (711–832) −7%
renderer memory, all tabs + workers (10 tabs) 1932 MB (1858–1936) 1876 MB (1874–1916) −3%
renderer processes (10 tabs) 12 12
sync still works after the first tab closes ok ok
edit → seen + confirmed, after first tab closed 174 ms (172–174) 173 ms (169–174) −1%
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 811 ms (804–818) 807 ms (799–816) −0%
boot → doc open, tab 2 309 ms (300–310) 306 ms (301–314) −1%
boot → doc open, tab 10 304 ms (293–307) 305 ms (303–306) +0%
open 40 tabs, wall clock 9152 ms (9146–9694) 9438 ms (9392–9447) +3%
boot → repo, last of 40 tabs 71 ms (68–76) 66 ms (64–81) −8%
boot → linked, last of 40 tabs – –
boot → server connected, last of 40 tabs 187 ms (180–198) 196 ms (185–198) +5%
renderer memory, 40 tabs 7246 MB (7240–7290) 7260 MB (7201–7276) +0%
renderer processes, 40 tabs 42 42
39 tabs find the doc: median 792 ms (764–808) 846 ms (841–853) +7%
39 tabs find the doc: slowest 968 ms (894–969) 955 ms (949–966) −1%
…all 39 found it ok ok
…finds that needed a retry (of 39) 0 0
edit → seen in 39 tabs: median tab 39 ms (35–41) 37 ms (33–38) −6%
edit → seen in 39 tabs: slowest tab 81 ms (72–92) 73 ms (69–75) −10%
…tabs that saw every edit (of 39) 39 39
edit → server holds our heads (40 tabs) 239 ms (229–259) 221 ms (219–240) −7%
…server confirmed every edit (40 tabs) ok ok
…longest main-thread stall in tab 0 during the edits 60 ms (52–69) 52 ms (36–57) −14%
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 45 ms (43–46) 40 ms (39–60) −11%
…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 56 ms (54–70) 61 ms (55–68) +8%
…and every such find() succeeded within 5s ok ok
…and none settled unavailable first ok ok
edit → seen in 2 other tabs 7 ms (6–7) 6 ms (6–7) −6%
…every edit reached every other tab within 5s ok ok
edit → server holds our heads 154 ms (153–155) 154 ms (153–154) +0%
…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 411 MB (401–414) 401 MB (401–413) −2%
renderer memory, 10 tabs 1890 MB (1863–1893) 1886 MB (1872–1888) −0%

@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

🪡 Patchwork

Torn down.

@chee
chee marked this pull request as ready for review October 24, 2026 04:24
@chee
chee merged commit fd9d3ef into main Oct 24, 2026
10 checks passed
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.

1 participant