Skip to content

Desktop: ProactiveAssistants frame backpressure can cause 2-3GB memory spikes #5791

Closed

Description

@beastoin

Problem

When OCR processing is slow (e.g., during video calls with Zoom detected), the screen capture pipeline continues capturing at 1 FPS while frames pile up in memory. The isProcessingRewindFrame + droppedFrameCount tracking exists but there's no hard limit on the backpressure queue.

Impact

  • App memory can spike to 2-3GB during video calls
  • App becomes unresponsive, may OOM crash
  • videoCallThrottleFactor = 5 helps but is hardcoded with no user control

Suggested Fix

  • Add a max frame buffer size (e.g., 10 frames) — drop oldest when exceeded
  • Consider user-configurable capture frequency
  • Add memory pressure monitoring to auto-reduce capture rate

Context

Found during desktop friction exploration (PR #5790, collab/desktop-friction-exploration branch).

Files: desktop/Desktop/Sources/ProactiveAssistants/ProactiveAssistantsPlugin.swift

Activity

  1. added
    bug
    p2
    on Mar 18, 2026
  2. added 10 commits that reference this issue on Mar 19, 2026
    bd9d3a5
    9ae447b
    2915e74
    3e05fd6
    cd488f0
    3f21729
    160bde0
    0cbaf63
    c3231b0
    411ec88
  3. beastoin commented on May 10, 2026

    @beastoin
    CollaboratorAuthor

    Addressed by merged PR(s): #5790

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

    bugdesktopp2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions