Skip to content

Batch activity cohort reads through the keyed table owner - #4885

Merged
trissim merged 1 commit into
mainfrom
perf/batched-activity-capture
Nov 18, 2026
Merged

trissim merged 1 commit into
mainfrom
perf/batched-activity-capture

Conversation

@trissim

@trissim trissim commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

12 focused checks pass; 67 activity queries become one requested-key query. Equal-warm alternated real-store captures: median 4.173 ms before / 3.304 ms after. This modest saving covers activity reads only, not total observer or UI CPU.

Repair

ActivityStore.captured_for uses ActivityRow.stream_keys, the existing indexed requested-key reader, instead of issuing ActivityRow.stream once per thread. TypedTable owns connection-variable batching. Original row decoding, requested-name order, missing activity, active stale activity and expiry retain their existing owners. No new cache, schema, carry or timer.

The control emits real events through ActivityStore, traces its original snapshot, and checks duplicate/missing names, expiry and query count. The exact historical owner method supplies the benchmark baseline.

Applied through an authored declaration-selected NRA plan; independent real-store checks supply semantic evidence. Existing guarded imports are outside this narrow hot-path repair; no whole-module slop cleanup is claimed.

Artifacts: /home/ts/.cache/agent-scratch/codex-latency/batched-activity/

Fixes P263.

@trissim
trissim marked this pull request as ready for review November 18, 2026 07:24
@trissim
trissim merged commit 51ef686 into main Nov 18, 2026
3 of 6 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