Skip to content

watch: start the viewer bridge from a small entry point #226

Open

Description

@ElbertePlinio

Found while benchmarking the passive viewer in #225 (issue #207).

The detached viewer bridge runs pickforge-lab internal viewer-bridge, so it loads the whole CLI bundle: MCP server, Sentry, commander and every command. It holds about 100 MiB resident while idle, and it stays running for up to 10 minutes after the last viewer closes. x11vnc beside it holds about 18 MiB.

Acceptance criteria:

  • The bridge starts from an entry point that loads only what it needs (node:http, ws, the viewer state helpers).
  • Idle resident memory of the bridge is measured before and after, on the same host and session size.
  • Bridge security behavior and tests stay unchanged.

Checklist:

  • Separate bridge entry in the published CLI
  • Before and after RSS measurement in the PR
  • Existing bridge and security tests pass

Activity

  1. added
    enhancement
    on Oct 3, 2026
  2. ElbertePlinio commented on Oct 8, 2026

    @ElbertePlinio
    MemberAuthor

    More evidence from #301. Besides memory, loading the full CLI bundle dominates the bridge's startup time. On an idle host the bridge uses about 0.4 s of CPU before it reports readiness, about 93% of it spent loading the CLI and telemetry setup. Under heavy load most of the readiness wait was CPU wait during that load, which is why #301 had to leave CPU wait out of the 8 s readiness budget. A small entry point would cut both.

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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions