GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Perf: cut worker-thread saturation/CPU from session diffs, snapshots, SQLite contention, and event fanout (PR #48638 series) · Issue #49974 · anomalyco/opencode

Perf: cut worker-thread saturation/CPU from session diffs, snapshots, SQLite contention, and event fanout (PR #48638 series) #49974

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
Perf: cut worker-thread saturation/CPU from session diffs, snapshots, SQLite contention, and event fanout (PR #48638 series)#49974
Copy link

Description

@AceRothstein71
AceRothstein71
opened on Sep 19, 2026
Issue body actions

Context

Part of the fork hardening/perf series proposed in #48638 (integration branch session-diff-events, fork AceRothstein71/opencode). Original tracker: #49565.

PR #48638 is intended to close this issue.

Problem

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.

Change set (commit list, session-diff-events)

  • 41b33fe processor coalesce
  • 562dccf processor coalesce cleanup
  • fdb3778 audit findings: diff/events/sqlite
  • 857ce25 doom-loop reload
  • c1fa943 wave 1-5 reliability
  • 15315be wave 6 residual
  • 56feb5c wave 7-11 hardening
  • 59c3e32 sqlite lanes
  • 3d64416 tui bridge sync
  • d84bbc6 session event-loop load
  • 6c1ddb3 snapshot heal
  • d27f83c snapshot index recovery
  • a38c279 vcs diff context
  • 2d1e6da core directory index
  • dc7e2ad wave G

Validation

  • Owner-observed: CPU usage is definitely lower under identical parallel-agent workloads.
  • Worker-thread stalls sharply reduced; turn-diff path bounded; mock-verified tool schema (206 tools, zero invalid required, zero empty combinators).

Linked: PR #48638 · tracker #49565 · sibling tracking issues listed in a follow-up comment.

Activity

  1. AceRothstein71 commented on Sep 19, 2026

    @AceRothstein71
    AceRothstein71
    on Sep 19, 2026
    Author
    More actions

    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.

  2. opencodejr commented on Oct 28, 2026

    @opencodejr
    opencodejrBot
    on Oct 28, 2026
    Contributor
    More actions

    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.

    Related items:

    • Worker-thread saturation under concurrent sessions: permission matching, turn-diff recomputation, event fanout, snapshot churn #49565: the original tracker for the same worker-thread saturation problem (closed by the bot for not using the issue templates)
    • fix: harden session diffs, snapshots, and write paths; cut worker-thread stalls under parallel agents #48638: the integration PR this issue refers to (currently closed)
    • Durable event table bloats from repeated turn diff payloads #48641: event table bloat from repeated turn-diff payloads, which fix: harden session diffs, snapshots, and write paths; cut worker-thread stalls under parallel agents #48638 originally targeted
    • fix(opencode): evict message diff patches from the event payload #42771: an earlier PR that also removed diff patches from event payloads
    • Security: fail-closed shell classifier hardening (waves H-L of PR #48638 series) #49975, Security: shell classifier convergence waves M-P under v16-v20 adversarial audits (PR #48638 series) #49976, Lifecycle: reload/teardown safety for instances (bounded drains, interrupt-safe claims, reusable-reload wedge fix) #49977, MCP/schema: validation hardening + anchor-form $ref retention (PR #48638 series) #49978, Server/SSE + event/db hardening (audit-v7 and wave B findings) #49979, Tooling: fork-follow autopatcher (upstream + patch-replay, staging gate, rollback) - contribution proposal #49980: the sibling tracking issues for the other parts of the series
  3. neriousy commented on Nov 19, 2026

    @neriousy
    neriousy
    on Nov 19, 2026
    Member
    More actions

    This issue tracks the change set from #48638, and that PR was closed without merging, so I'm closing this along with its sibling trackers. If you can reproduce a specific stall or CPU spike under parallel agents on a current release, please open a focused issue with the workload and measurements, or send a small PR for one subsystem.

  4. neriousy
    closed this as not plannedon Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.