Skip to content

Fix Windows capture startup stalls and reduce active-work CPU#3945

Merged
louis030195 merged 1 commit into
mainfrom
codex/windows-cpu-capture-optimization
Jun 9, 2026
Merged

Fix Windows capture startup stalls and reduce active-work CPU#3945
louis030195 merged 1 commit into
mainfrom
codex/windows-cpu-capture-optimization

Conversation

@louis030195

Copy link
Copy Markdown
Collaborator

Summary

  • Wrap startup capture in the same 15s timeout used by live captures so a stuck first Windows/UIA capture cannot block the monitor loop forever.
  • Gate visual-change screenshots while keyboard activity is still recent, avoiding redundant background frame-diff captures during typing-driven full captures.
  • Keep visual checks active after keyboard activity goes quiet, so mouse-only movement does not suppress passive visual capture.

Verification

  • cargo fmt --package screenpipe-engine
  • cargo build -p screenpipe-engine --profile release-dev --no-default-features
  • 5-minute Windows CLI benchmark with simulated Notepad typing, audio/telemetry/meeting detector disabled:
    • before startup timeout fix: UI events persisted but 0 frames
    • after startup timeout fix: 77 frames / 77 UI events
    • after keyboard-only visual gate: mean CPU 3.579%, median 2.972%, p90 7.411%, max 12.394%, with 77 frames / 77 UI events / 77 non-empty accessibility frames

Notes

  • Focused cargo test did not complete in this local workspace: debug target filled the system drive, and release-dev test harness compilation timed out. The release-dev build and runtime benchmark completed successfully.

@louis030195 louis030195 force-pushed the codex/windows-cpu-capture-optimization branch from 9895e02 to 1c07969 Compare June 9, 2026 21:39
@louis030195 louis030195 force-pushed the codex/windows-cpu-capture-optimization branch from 1c07969 to 32f183a Compare June 9, 2026 21:42
@louis030195 louis030195 merged commit e15ef1b into main Jun 9, 2026
23 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