Skip to content

perf(memory): defer startup CLI update check and bound concurrent version probes - #47630

Closed
nwparker wants to merge 1 commit into
perf/mem-08-idle-stop-profile-writer-and-port-scanfrom
perf/mem-09-defer-and-throttle-agent-cli-update-probes
Closed

nwparker wants to merge 1 commit into
perf/mem-08-idle-stop-profile-writer-and-port-scanfrom
perf/mem-09-defer-and-throttle-agent-cli-update-probes

Conversation

@nwparker

@nwparker nwparker commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Defer the background local agent CLI update check by 15s past initial app mount (use-local-agent-cli-update-check.ts) and bound checkAgentCliUpdates to at most 2 concurrent --version subprocesses instead of an unbounded Promise.all across all installed agent CLIs.

Memory Impact (macOS /usr/bin/footprint, Electron 43.8.10)

  • At Launch footprint: 1,250.7 MiB -> 989.1 MiB (-261.5 MiB; -454.5 MiB / -31.5% vs 1,443.7 MiB baseline)
  • At Launch RSS: 1,467.6 MiB -> 1,045.2 MiB (-422.4 MiB)
  • At Launch process count: 22 -> 16 (-6 concurrent processes)

Verification

  • pnpm check:changed --base=perf/mem-08-idle-stop-profile-writer-and-port-scan: 38/38 passed

@brennanb2025

Copy link
Copy Markdown
Contributor

Superseded by #47923, which keeps the deferred check but caps only the --version probes, with a check budget and retry after a failure (startup probe processes 26 -> 12). Measured main vs head on win-high with a 1,921-worktree / 1,800-chat profile and a small profile. Thanks for the stack!

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.

2 participants