Repository navigation
perf(memory): defer startup CLI update check and bound concurrent version probes - #47630
Closed
nwparker wants to merge 1 commit into
Conversation
Merged
11 tasks done
10 of 11 tasks
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! |
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.
Summary
Defer the background local agent CLI update check by 15s past initial app mount (
use-local-agent-cli-update-check.ts) and boundcheckAgentCliUpdatesto at most 2 concurrent--versionsubprocesses instead of an unboundedPromise.allacross all installed agent CLIs.Memory Impact (macOS
/usr/bin/footprint, Electron 43.8.10)1,250.7 MiB->989.1 MiB(-261.5 MiB;-454.5 MiB/-31.5%vs1,443.7 MiBbaseline)1,467.6 MiB->1,045.2 MiB(-422.4 MiB)22->16(-6concurrent processes)Verification
pnpm check:changed --base=perf/mem-08-idle-stop-profile-writer-and-port-scan: 38/38 passed