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
Perf: cut worker-thread saturation/CPU from session diffs, snapshots, SQLite contention, and event fanout (PR #48638 series) #49974
Part of the fork hardening/perf series proposed in #48638 (integration branch session-diff-events, fork AceRothstein71/opencode). Original tracker: #49565.
Under concurrent sessions / parallel agents: worker-thread saturation from permission matching, turn-diff recomputation, event fanout to TUI/server clients, snapshot churn and snapshot-index recovery, and SQLite contention across sessions. Symptoms: stalled turns, high CPU, delayed diffs.
Thanks for putting this together and for working on performance with many parallel agents.
As I understand it, you'd like to reduce worker-thread CPU use and stalls when many sessions or subagents run at once. The changes on your session-diff-events branch target permission matching, turn-diff recomputation, event fanout to TUI/server clients, snapshot churn and recovery, and SQLite contention. Maintainers will consider it. Since this is a broad set of changes, small focused PRs (one subsystem each), each with a workload others can rerun and before/after numbers, will be much easier to review than one integration branch.
Activity
AceRothstein71 commentedon Sep 19, 2026
Cross-links: sibling tracking issues #49974 (perf/runtime), #49975 (shell classifier H-L), #49976 (shell classifier M-P), #49977 (instance lifecycle), #49978 (MCP/schema), #49979 (server/SSE + event/db), #49980 (updater tooling). Integration PR: #48638. Original tracker: #49565.
opencodejr commentedon Oct 28, 2026
Thanks for putting this together and for working on performance with many parallel agents.
As I understand it, you'd like to reduce worker-thread CPU use and stalls when many sessions or subagents run at once. The changes on your
session-diff-eventsbranch target permission matching, turn-diff recomputation, event fanout to TUI/server clients, snapshot churn and recovery, and SQLite contention. Maintainers will consider it. Since this is a broad set of changes, small focused PRs (one subsystem each), each with a workload others can rerun and before/after numbers, will be much easier to review than one integration branch.Related items: