Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(childprocess): spawned processes are tracked and monitored. #6304

Draft
wants to merge 23 commits into
base: master
Choose a base branch
from

Conversation

Hweinstock
Copy link
Contributor

@Hweinstock Hweinstock commented Jan 3, 2025

Problem

TODO: further investigate flaky test on windows.

Toolkit/Q slow performance is consistently reported by customers: https://github.com/aws/aws-toolkit-vscode/issues?q=is%3Aopen+is%3Aissue+label%3Aperformance

Toolkit/Q features can spawn processes, included many long-lived processes such as LSP servers. The cost of these processes is hidden and hard to troubleshoot. Any misbehaving process will not be noticed except in a coarse "Toolkit/Q causes vscode to be slow" manner.

Solution

  • Track all running processes in a map-like data structure.
  • use a PollingSet to periodically "monitor" their system usage(cpu%, memory bytes), logging warning messages when it exceeds a threshold.
  • Add developer command to instantiate spawned processes via ChildProcess wrapper to make this easier to test.

Future Work

  • Integrate telemetry into the tracker instead of only logging.
  • Add public-facing (non-dev) command so that users can view active processes and their usages.

  • Treat all work as PUBLIC. Private feature/x branches will not be squash-merged at release time.
  • Your code changes must meet the guidelines in CONTRIBUTING.md.
  • License: I confirm that my contribution is made under the terms of the Apache 2.0 license.

@Hweinstock Hweinstock changed the title perf(ChildProcess): spawned processes are tracked and monitored. perf(childprocess): spawned processes are tracked and monitored. Jan 3, 2025
@Hweinstock Hweinstock closed this Jan 3, 2025
@Hweinstock Hweinstock reopened this Jan 3, 2025
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.

1 participant