You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Performance round: measure on real data, then fix the top costs #1475
The August performance issues (#225, #564, #617, #618, #639, #640) are all closed and their numbers are stale. This round starts from fresh measurements on today's real data.
Baseline (2026-10-05, live data, read-only)
Store file:coder-store.json is 6.0 MB and parses in 18 ms. Boot parse is no longer an issue.
Threads: 2,097, of which 958 are live (not archived), across 14 projects. Message shards: 2,097 files, 788 MB, the largest 3.6 MB.
PM1, main process, on a clone of the userData dir: the boot timeline (window, first list, interactive); IPC payload sizes and rates for hot channels at 2k threads; a CPU profile during boot and during simulated streaming; what holds the main-process heap; disk writes while streaming.
PM2, renderer, the real Electron app on the clone driven over CDP: first render; sidebar with ~958 live rows; switching to the largest threads; typing latency; long tasks while streaming; heap and DOM-node breakdown.
Phase 2: fix
Pick the top costs from the Phase 1 numbers. Each fix needs a before/after measurement taken the same way.
Open from before: #1398 (scope threads:summaries); PM1 will check whether #1424 already covered it.
What happened: booting the app against a cp -Rc clone of userData is NOT isolated. The cloned worktrees/*/.git files point into the real repos' .git/worktrees/<id>. At 19:37, PM2's clone boot ran sweepOrphanWorktrees, which switched three real worktrees of archived threads to recovered/* branches and committed their uncommitted work there:
e055dfbb in ~/Desktop/Apps/saas/appfeedback
7f93b763 and 08472090 in ~/code/huskyscout
Restore (by PM2, at 19:39), verified independently:
All three worktrees are back on their original branches.
Their full contents (untracked included, compared via a temp index) are identical to the 19:37 snapshots.
The original branch tips have no ref changes today.
No recovered/* branches remain in any of the 14 project repos.
All 21 live worktree registrations are intact.
The live memory.db (which the clone's memory-server.json also pointed at) passes PRAGMA quick_check.
Prevention: the safe launch recipe (PM1 used it with zero leaks) is in agent memory as solenta-cloned-data-dir-launch. PM2 has been told to use only that recipe from here on. Any future perf or dogfood worker gets it in its prompt.
Renderer heap growth in Electron: +12 MB over the soak in Electron, against ~1.5 MB in the browser. Heap snapshots on the PM3 zero-leak recipe, to name the retainers.
Activity
currentbits commentedon Oct 5, 2026
Incident during PM2 (resolved, no data lost)
What happened: booting the app against a
cp -Rcclone of userData is NOT isolated. The clonedworktrees/*/.gitfiles point into the real repos'.git/worktrees/<id>. At 19:37, PM2's clone boot ransweepOrphanWorktrees, which switched three real worktrees of archived threads torecovered/*branches and committed their uncommitted work there:e055dfbbin ~/Desktop/Apps/saas/appfeedback7f93b763and08472090in ~/code/huskyscoutRestore (by PM2, at 19:39), verified independently:
recovered/*branches remain in any of the 14 project repos.PRAGMA quick_check.Prevention: the safe launch recipe (PM1 used it with zero leaks) is in agent memory as
solenta-cloned-data-dir-launch. PM2 has been told to use only that recipe from here on. Any future perf or dogfood worker gets it in its prompt.PM1 results (main process):
docs/perf/2026-10-05-main-process.mdthreads:summariescall per session reads 463 MiB of transcripts synchronously, freezing the main process for 2.07 s when the Agents panel opens. P1: Scope threads:summaries so opening Agents does not read every transcript #1398 is only partly fixed.projects:listandgit:listBranches: 140 ms on the boot path, and ~170 ms stalls on run starts.files:resolvefan-out: 424 IPCs and 131 ms per thread open.Idle is fine: 50 ms of main JS per 30 s.
currentbits commentedon Oct 5, 2026
PM2 results (renderer):
docs/perf/2026-10-05-renderer.mduseStickToBottomruns on every push: ~25–30 ms/s.threads:changedships 2.68 MB (all 2,004 rows): a ~21 ms renderer hitch per status change. PM1 found the same.Fine: the sidebar at 966 rows, small-thread switches, idle typing, streaming into a thread that isn't open, and memory after switching (no leaks).
Phase 2: fixes running (six parallel workers, disjoint files)
Next batch, after these land:
threads:changedrow patches (PM1 fix: keep the sidebar's New-thread dropdown inside the app window #7, PM2 fix: assistant text between tool calls uses the full timeline column width #5)files:resolvebatching (PM1 fix: assistant text between tool calls uses the full timeline column width #5)No fix worker launches the app on cloned data. They measure with Store-on-a-copy benchmarks, unit benchmarks or the dev renderer.
Merge pull request #1476 from currentbits/coder/perf-pm1-measure-main…
Merge pull request #1477 from currentbits/coder/perf-pm2-measure-rend…
Merge pull request #1478 from currentbits/coder/perf-f-provenance-inc…
currentbits commentedon Oct 5, 2026
Progress:
threads:summariesno longer reads transcripts (PM1 Add settings toggle to isolate new threads in a git worktree by default #2). On cloned real data the first call went from 7.4 s to 4.7 ms, and the output is byte-identical across all 2,009 rows.Merge pull request #1479 from currentbits/coder/perf-f-boot-path-capt…
Merge pull request #1480 from currentbits/coder/perf-f-summaries-no-t…
Merge pull request #1481 from currentbits/coder/perf-f-store-stop-env…
Merge pull request #1482 from currentbits/coder/perf-f-transcript-win…
currentbits commentedon Oct 5, 2026
Batch 1 status: #1478, #1479, #1480, #1481 and #1482 are merged. #1483 is in CI, re-running a Windows-only failure.
Batch 2 started. Four workers, each owning separate files:
threads:changedsends row patches instead of the 2.68 MB full list (PM1 fix: keep the sidebar's New-thread dropdown inside the app window #7 / PM2 fix: assistant text between tool calls uses the full timeline column width #5).files:resolve; today one thread open makes 424 IPCs costing 131 ms (PM1 fix: assistant text between tool calls uses the full timeline column width #5).React.lazyfor rarely opened views, plus localStorage hygiene: drop archived threads from the boot snapshot and prune stalepaneLayoutkeys (PM2 fix: keep the sidebar's New-thread dropdown inside the app window #7, Thread runner kills agent child processes on turn settle; permission requests fail while settling #8).usageThreadsByDayout of the envelope, and load work logs lazily (PM1 #1c, Thread runner kills agent child processes on turn settle; permission requests fail while settling #8).test(markdown): 1.5k fuzz mixes so the file fits Windows CI's 20 s li…
Merge pull request #1484 from currentbits/coder/perf-g-resolve-batch-…
Merge pull request #1483 from currentbits/coder/perf-f-markdown-incre…
6 remaining items
Merge pull request #1488 from currentbits/coder/perf-h-mainheap-byte-…
currentbits commentedon Oct 6, 2026
Round 3 status:
Deep dives started:
Merge pull request #1489 from currentbits/coder/perf-h-switch-big-thr…
Merge pull request #1490 from currentbits/coder/perf-h-heap-renderer-…
Merge pull request #1491 from currentbits/coder/deep-dive-transcript-…
currentbits commentedon Oct 6, 2026
Deep dives done.
scrollTopclamp unstuck the transcript, so the window never trimmed again. Pin loss went from 9/24 to 0/24 runs.thread:updated, the parse cache reaching its budget, and V8 code space.Left (bounded, small):
thread:updatedafter launch is a full 4 MB transcript;Merge pull request #1492 from currentbits/coder/deep-dive-electron-re…
currentbits commentedon Oct 9, 2026
Done: measurements and fixes landed for 0.24.0 (e45a09a before/after, 8e77940 row patches, 8ad23c8 provenance, 5255a69 byte-capped hydration, e0f8561 tail-first switch). Closing in the 2026-10-09 board cleanup (#1532).
Build devCoder on first use, not at import (#1439) (#1584)
Long threads load in pages and render lighter, safer file restores, a…