Skip to content

CPU resource consumption #111

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

Open
takapiro99 opened this issue Nov 29, 2022 · 3 comments
Open

CPU resource consumption #111

takapiro99 opened this issue Nov 29, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@takapiro99
Copy link

Description

After a short while of opening a kotlin project, it consumes most of the CPU resources.

It also activates the heat dissipation fan, which is unusual for M1, and makes the entire PC run slower.

Any clues as to the cause?

thanks in advance.

Extension version

v0.2.26

Additional context

MacBook Pro (14in, 2021)
Apple M1 Max, 64GB memory

@takapiro99 takapiro99 added the bug Something isn't working label Nov 29, 2022
@themkat
Copy link
Contributor

themkat commented Nov 29, 2022

I use a Macbook Air M1, and have never experienced such issues 😱 Big projects are a memory hog (due to the indexer in the language server), but CPU is usually stable. Some questions:

  1. Does this happen always? Or just when opening projects? The indexer needs some time to start, and my main guess is that it takes more CPU as well due to all the processing being done. We have some issues in the language server on this, most notably this one: Investigate memory usage and an on-disk index kotlin-language-server#352. For bigger projects you should expect some time for the indexing and initialisation to be done. Then everything should be pretty stable (though with some memory usage).
  2. What Java version are you using? I experienced much more effective (i.e, less CPU usage and faster processing) when upgrading to Java 18 on my M1 Mac. Maybe this could be something to try? Especially if you use an older Java version. Also, make sure you are using a Java build for Apple Silicon/ARM, and not a X64 build that will be emulated through Rosetta.
  3. Do you have any special settings for Java on your machine? Having too little memory, heap size etc. might cause the garbage collector to run more often. Do you have any custom settings for memory, garbage collection etc.?
  4. Is this a very big project? Or do you experience it with different projects? Big projects will use more resources, especially memory. Might as mentioned in 1 use more CPU during indexing as well.

@coalo
Copy link

coalo commented Mar 28, 2025

java 17,not a big project,when my cursor install kotlin ,the java process consumes 200%~300% cpu

@lucaspolonuer
Copy link

Same issue here.

Apple M4 Pro
Sequoia 15.4 (24E248)
VSCode Version: 1.96.2
Extension version: 0.2.36

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants