Skip to content

Drop detail-only fields from threads:changed rows (−47% per push) - #1389

Merged
currentbits merged 1 commit into
mainfrom
perf/slim-thread-list
Sep 29, 2026
Merged

currentbits merged 1 commit into
mainfrom
perf/slim-thread-list

Conversation

@currentbits

Copy link
Copy Markdown
Owner

Refs #1385. This is the first cut; excluding archived rows from the live push is left open on the issue.

Problem

Each threads:changed push serializes every non-trashed thread. On a copy of the live store that's 1,829 rows and 4.59 MB, and it fires about once a second while several threads work (stampLastEvent replaces the threads array every ~5 s per active thread). hypotheses (1.13 MB) and suggestions (1.0 MB) rode along on every row.

Fix

listThreads rows omit hypotheses and suggestions. The renderer reads both only from detail.thread: ThreadView → SuggestedWorkStrip and AgentsPanel → HypothesisLedgerCard, where App passes visibleDetail.thread. getThreadDetail still decorates the full thread. Main-side listThreads consumers (threads:list, quitGuard, the worktree forecast) don't read either field.

Result

The same live-store copy goes from 4.59 MB to 2.44 MB per push (−47%).

Verification

  • New services.test.js case: list rows omit both fields; getThreadDetail still returns them.
  • Full npm run test:electron (CI-like env): 4057/4059. The 2 failures are memory-sup supervisor spawn and provider-usage fetchCodex timeout, both untouched by this change. Each passes 2/2 in isolation (load from concurrent runs).

🤖 Generated with Claude Code

Every threads:changed push carried hypotheses and suggestions for every
thread. The renderer reads both from detail.thread only (ThreadView's
SuggestedWorkStrip, AgentsPanel's HypothesisLedgerCard), and the detail
path still decorates the full thread. On a copy of the live store
(1,829 rows) the push drops from 4.59 MB to 2.44 MB.

Refs #1385

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@currentbits
currentbits merged commit 3988ab5 into main Sep 29, 2026
10 of 12 checks passed
@currentbits
currentbits deleted the perf/slim-thread-list branch September 29, 2026 14:43
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