fwcd / fwcd/kotlin-language-server
CPU usage is blowing while using in large project (w/ ~500MB of source code & several worktrees)
- Dominant language
- Kotlin
- Stars
- 2k
- Forks
- 252
- PR merge metrics
- No merged PRs in 30d
Description
Hello!
Thanks for such the powerful plugin. However, recently I found that my CPU usage is unreasonably high loaded. I checked the Process Explorer in VSCode and done some quick search, it turns out that this plugin is causing CPU high loading (~700% CPU usage on MacOS, MBP M4).
Since it's causing for days, I currently disabled the plugin.
I'm posting the call site here, copied from Process Explorer. Might help.
```bash
java -DkotlinLanguageServer.version=1.3.13 -classpath /Users/user/Library/Application Support/Code/User/globalStorage/fwcd.kotlin/langServerInstall/server/lib/server-1.3.13.jar:/Users/user/Library/Application Support/Code/User/globalStorage/fwcd.kotlin/langServerInstall/server/lib/shared-1.3.13.jar:/Users/user/Library/Application Support/Code/User/globalStorage/fwcd.kotlin/langServerInstall/server/lib/kotlin-scripting-jvm-host-unshaded-2.1.0.jar:/Users/user/Library/Application Support/Code/User/globalStorage/fwcd.kotlin/langServerInstall/server/lib/kotlin-scripting-compiler-2.1.0.jar:/Users/user/Library/Application Support/Code/User/globalStorage/fwcd.kotlin/langServerInstall/server/lib/ktfmt-b5d31d1.jar:/Users/user/Library/Application Support/Code/User/globalStorage/fwcd.kotlin/langServerInstall/server/lib/kotlin-compiler-2.1.0.jar:/Users/user/Library/Application Support/Code/User/globalStorage/fwcd.kotlin/langServerInstall/server/lib/exposed-dao-0.37.3.jar:/Users/user/Library/Application Support/Code/User/globalStorage/fwcd.kotlin/langServerInstall/server/lib/exposed-jdbc-0.37.3.jar:/Users/user/Library/Application Support/Code/User/globalStorage/fwcd.kotlin/langServerInstall/server/lib/exposed-core-0.37.3.jar:/Users/user/Library/Application Support/Code/User/globalStorage/fwcd.kotlin/langServerInstall/server/lib/kotlin-scripting-compiler-impl-2.1.0.jar:/Users/user/Library/Application Support/Code/User/globalStorage/fwcd.kotlin/langServerInstall/server/lib/kotlin-reflect-2.1.0.jar:/Users/user/Library/Application Support/Code/User/globalStorage/fwcd.kotlin/langServerInstall/server/lib/kotlin-scripting-jvm-2.1.0.jar:/Users/user/Library/Application Support/Code/User/globalStorage/fwcd.kotlin/langServerInstall/server/lib/kotlin-scripting-common-2.1.0.jar:/Users/user/Library/Application Support/Code/User/globalStorage/fwcd.kotlin/langServerInstall/server/lib/kotlinx-coroutines-core-jvm-1.6.4.jar:/Users/user/Library/Application Support/Code/User/globalStorage/fwcd.kotlin/langServerInstall/server/lib/kotlin-stdlib-jdk8-2.1.0.jar:/Users/user/Library/Application Support/Code/User/globalStorage/fwcd.kotlin/langServerInstall/server/lib/kotlin-stdlib-jdk7-2.1.0.jar:/Users/user/Library/Application Support/Code/User/globalStorage/fwcd.kotlin/langServerInstall/server/lib/kotlin-stdlib-2.1.0.jar:/Users/user/Library/Application Support/Code/User/globalStorage/fwcd.kotlin/langServerInstall/server/lib/org.eclipse.lsp4j-0.21.2.jar:/Users/user/Library/Application Support/Code/User/globalStorage/fwcd.kotlin/langServerInstall/server/lib/org.eclipse.lsp4j.jsonrpc-0.21.2.jar:/Users/user/Library/Application Support/Code/User/globalStorage/fwcd.kotlin/langServerInstall/server/lib/kotlin-sam-with-receiver-compiler-plugin-2.1.0.jar:/Users/user/Library/Application Support/Code/User/globalStorage/fwcd.kotlin/langServerInstall/server/lib/fernflower-1.0.jar:/Users/user/Library/Application Support/Code/User/globalStorage/fwcd.kotlin/langServerInstall/server/lib/h2-1.4.200.jar:/Users/user/Library/Application Support/Code/User/globalStorage/fwcd.kotlin/langServerInstall/server/lib/jcommander-1.78.jar:/Users/user/Library/Application Support/Code/User/globalStorage/fwcd.kotlin/langServerInstall/server/lib/sqlite-jdbc-3.41.2.1.jar:/Users/user/Library/Application Support/Code/User/globalStorage/fwcd.kotlin/langServerInstall/server/lib/google-java-format-1.8.jar:/Users/user/Library/Application Support/Code/User/globalStorage/fwcd.kotlin/langServerInstall/server/lib/guava-33.3.0-jre.jar:/Users/user/Library/Application Support/Code/User/globalStorage/fwcd.kotlin/langServerInstall/server/lib/annotations-13.0.jar:/Users/user/Library/Application Support/Code/User/globalStorage/fwcd.kotlin/langServerInstall/server/lib/gson-2.10.1.jar:/Users/user/Library/Application Support/Code/User/globalStorage/fwcd.kotlin/langServerInstall/server/lib/kotlin-script-runtime-2.1.0.jar:/Users/user/Library/Application Support/Code/User/globalStorage/fwcd.kotlin/langServerInstall/server/lib/trove4j-1.0.20200330.jar:/Users/user/Library/Application Support/Code/User/globalStorage/fwcd.kotlin/langServerInstall/server/lib/jline-3.24.1.jar:/Users/user/Library/Application Support/Code/User/globalStorage/fwcd.kotlin/langServerInstall/server/lib/slf4j-api-1.7.25.jar:/Users/user/Library/Application Support/Code/User/globalStorage/fwcd.kotlin/langServerInstall/server/lib/jna-4.2.2.jar:/Users/user/Library/Application Support/Code/User/globalStorage/fwcd.kotlin/langServerInstall/server/lib/failureaccess-1.0.2.jar:/Users/user/Library/Application Support/Code/User/globalStorage/fwcd.kotlin/langServerInstall/server/lib/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar:/Users/user/Library/Application Support/Code/User/globalStorage/fwcd.kotlin/langServerInstall/server/lib/jsr305-3.0.2.jar:/Users/user/Library/Application Support/Code/User/globalStorage/fwcd.kotlin/langServerInstall/server/lib/checker-qual-3.43.0.jar:/Users/user/Library/Application Support/Code/User/globalStorage/fwcd.kotlin/langServerInstall/server/lib/error_prone_annotations-2.28.0.jar org.javacs.kt.MainKt
```
Thanks!
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the org.javacs.kt.MainKt language-server entry point and reproduce the report with a project containing roughly 500MB of Kotlin source and several worktrees. Use VS Code's Process Explorer to compare CPU usage with the plugin enabled; done means the language server no longer sustains the reported excessive load in that scenario.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin, vscode
- Domain
- devtools, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100