Skip to content

Commit

Permalink
fix(amazonq): Improve indexing auto start-stop strategy #5929
Browse files Browse the repository at this point in the history
## Problem
When multiple IDE instances are opened at the same time, the `@workspace
` indexing can increase CPU usage to a point that system fan needs to
engage. IDE can be slow if it is older devices like intel i5 or i7 Mac
OS.

## Solution

When multiple IDE instances are opened at the same time, the
`@workspace` indexing can increase CPU usage to a point that system fan
needs to engage. IDE can be slow if it is older devices like intel i5 or
i7 Mac OS. This PR is to improve indexing auto start-stop strategy,
detect CPU usage more frequently and pause indexing more aggressively
whenever system total CPU usage goes up. In the mean time, further
reduce CPU usage for old Intel i5, i7 devices, make sure one IDE
instance at most utilize one physical core and all instance combined
cannot exceed 1 for any extended period of time more than a few seconds,
unless user explicit allows more CPU usage in settings. Other mechanisms
are implemented to stop indexing if system available memory is small.
  • Loading branch information
leigaol authored Nov 5, 2024
1 parent 1486e3a commit 34b695a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "Bug Fix",
"description": "Improve `@workspace` index auto pause start strategy. "
}
2 changes: 1 addition & 1 deletion packages/core/src/amazonq/lsp/lspController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export interface Manifest {
}
const manifestUrl = 'https://aws-toolkit-language-servers.amazonaws.com/q-context/manifest.json'
// this LSP client in Q extension is only going to work with these LSP server versions
const supportedLspServerVersions = ['0.1.24']
const supportedLspServerVersions = ['0.1.25']

const nodeBinName = process.platform === 'win32' ? 'node.exe' : 'node'

Expand Down

0 comments on commit 34b695a

Please sign in to comment.