Repository navigation
perf(cli): open the mic, camera and capture content concurrently when recording starts - #2591
Open
richiemcilroy wants to merge 3 commits into
Open
richiemcilroy wants to merge 3 commits into
richiemcilroy wants to merge 3 commits into
Conversation
… recording starts
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
richiemcilroy
changed the base branch from
perf/cli-instant-skip-camera
to
main
October 15, 2026 00:18
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cap record startset up its inputs one after another: camera, then mic, then the ScreenCaptureKit shareable content, then the actor. The mic name check also calledMicrophoneFeed::list(), which opens and queries every input device for a usable config. That cost 200-680 ms before the mic was even opened.flowchart LR subgraph before A1[camera open + lock] --> B1["MicrophoneFeed::list()<br/>(probes every device)"] --> C1[mic open + 100 ms warm-up + lock] --> D1[ShareableContent] --> E1[build actor] end subgraph after A2[ShareableContent] --> E2[build actor] B2["list_names() + mic open + warm-up + lock"] --> E2 C2[camera open + lock] --> E2 endapps/cli/src/record.rs: the shareable content fetch,open_mic_feedandopen_camera_feedrun under onetokio::try_join!. The actor builders get the same locks and the sameShareableContentas before.MicrophoneFeed::list_names(), the same listcap targets micsprints. Opening the device still fails with the existing error if it can't be used.Benchmark
Launch to "Recording started", real devices (built-in camera, MacBook Pro mic, system audio), median of 3, M4 Max:
mainmain.

Confidence Score: 5/5
The PR appears safe to merge; no actionable issues were found.Summary
Prepares capture content, microphone, and camera together when recording starts.
Reviews (2) · Last reviewed commit: "perf(cli): open the mic, camera and capt..." · Reviewed by Greptile