Skip to content

Commit b1cc7f8

Browse files
authored
fix(amazonq): set Q_WORKER_THREADS only when setting is >0 (aws#4766)
1 parent b7e3d29 commit b1cc7f8

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type" : "bugfix",
3+
"description" : "fix(amazonq): Amazon Q chat `@workspace` uses more than 20% cpu"
4+
}

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/cwc/editor/context/project/EncoderServer.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,12 @@ class EncoderServer(val project: Project) : Disposable {
118118
val map = mutableMapOf<String, String>(
119119
"PORT" to port.toString(),
120120
"START_AMAZONQ_LSP" to "true",
121-
"Q_WORKER_THREADS" to threadCount.toString(),
122121
"CACHE_DIR" to cachePath.toString(),
123122
"MODEL_DIR" to cachePath.resolve("qserver").toString()
124123
)
124+
if (threadCount > 0) {
125+
map["Q_WORKER_THREADS"] = threadCount.toString()
126+
}
125127
if (isGpuEnabled) {
126128
map["Q_ENABLE_GPU"] = "true"
127129
}

0 commit comments

Comments
 (0)