Skip to content

perf(web): reduce memory used by retained note tabs - #105

Merged
dcolthorp merged 8 commits into
mainfrom
t3/reduce-web-app-memory
Nov 6, 2026
Merged

dcolthorp merged 8 commits into
mainfrom
t3/reduce-web-app-memory

Conversation

@dcolthorp

@dcolthorp dcolthorp commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

Summary

Opening many notes kept every visited note's rendered content in memory. Keep five recent native note bodies ready, while retaining every tab's data, history and reading state. Editors and isolated HTML viewers stay protected.

Open tab data and reading state
  ├─ Five recent native bodies stay rendered
  ├─ Older bodies rebuild from retained data
  └─ Editors and HTML viewers keep their live state

Delivery

Merged as b3b59030da445a91d58cfcab0be49fa80b9215e8 after all 22 checks passed. Rebuilt and relaunched Rhizome Dev from that main revision; the installer confirmed the running bundle at /Applications/Rhizome Dev.app.

Evidence

  • A matched 24-note Chromium workload reduced retained JavaScript heap by 57.7%, with recent-tab switching unchanged. Five alternating runs per build in Chromium and WebKit made no extra note queries or observed empty frames.
  • Before/after browser regressions cover body release, reading-position restoration after delayed layout, fresh navigation, and editor undo. Sol's fingerprint-refresh finding has two regression tests that failed before the fix and pass afterward.
  • make check passed 1,996 web tests plus the Go/content/type gates; the rebased browser suite passed 129 tests; documentation validation passed. Detailed run data and measurement limits.

The Windows integration run exposed an unsafe test cleanup path. Cleanup now retains the original process handle; a deterministic subprocess regression and Windows handle-lifetime assertions cover it. The runtime integration suite passed locally with -race. The original CI failure attribution remains unconfirmed.

Merge Danger

Door: Two-way. No storage or API migration.

Blast Radius: Notes. The change affects native note rendering and restoration; editing sessions and isolated HTML viewers remain resident.

Council review

Architecture review, 2 rounds across the two available providers:

Delegate Round 1 Round 2
GPT-6.1 Sol 8/10 9/10
Claude Opus 5.5 6/10 8.5/10

Greptile reviewed 9acaf3de4: 5/5, no comments. Native Windows integration tests passed, including handle retention and release.

Reviewed with sol-loop: 5 rounds with GPT-6.1 Sol. Sol verdict: approved. S1 fixed: mutable structural fingerprints no longer remount editors or discard reading state. G1 fixed collection-filter restoration. S2/C1 fixed integration-test process handle retention and its Windows assertion. No declined findings. Usage was not exposed.

Review scope: +3,730/−229 lines before Sol; final +4,045/−242 across 23 files, including measurement evidence and regression tests. S1, G1, S2 and C1 are resolved; no declined findings. Review usage was not exposed.

Created with GPT-6.1 Sol and native GPT-6.1 Sol implementation subagents in T3 Code through the Codex harness.

@dcolthorp
dcolthorp force-pushed the t3/reduce-web-app-memory branch from 2570e7b to 90bc3c1 Compare November 6, 2026 15:15
@dcolthorp
dcolthorp force-pushed the t3/reduce-web-app-memory branch from 90bc3c1 to b96f009 Compare November 6, 2026 15:17
@dcolthorp
dcolthorp merged commit b3b5903 into main Nov 6, 2026
22 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