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

"Language Support For Java" Extension is slowing down my CPU #1371

Closed
ghost opened this issue Apr 7, 2020 · 10 comments
Closed

"Language Support For Java" Extension is slowing down my CPU #1371

ghost opened this issue Apr 7, 2020 · 10 comments

Comments

@ghost
Copy link

ghost commented Apr 7, 2020

I had just installed the "Language support for Java" Extension on vscode but I find out that it takes too long to load whenever I open a .java file. It also slows my computer down when other tasks are running.

Environment
  • Operating System: Windows
  • JDK version: 14
  • Visual Studio Code version: 1.43.2
  • Java extension version: 0.59.1
Steps To Reproduce
  1. Restarted vscode
  2. Uninstalled and installed The "Language Support For Java" Extension
  3. Uninstalled and installed vscode
  4. Cleaned the workspace cache and history
Current Result

Extension taking too long to load and also slowing down the whole system

Expected Result

Extension to be fully loaded and ready

@fbricon
Copy link
Collaborator

fbricon commented Apr 7, 2020

Please define "long"

@ghost
Copy link
Author

ghost commented Apr 8, 2020

It is like taking almost half an hour to load fully and during the duration of the load, It is slowing down my computer.

Long meaning:
Lasting or taking a great amount of time.

@testforstephen
Copy link
Collaborator

What do you mean "slowing down my computer"? High CPU usage?

Could you disable all other extensions and only keep "Language Support For Java" Extension, then try again?

@ghost
Copy link
Author

ghost commented Apr 8, 2020

Yes, It is slowing down my computer and i will do as you say.

@ghost
Copy link
Author

ghost commented Apr 8, 2020

It is saying: "100% Starting Java language server" but actually it is not starting. I have a log file to show that. This shows what files are being loaded:

javalangext.log
Video To show the loading

In the video mentioned above, I have shown as to what all files are being loaded.

@ghost ghost changed the title "Language Support For Java" Extension is taking too long to respond "Language Support For Java" Extension is slowing down my CPU Apr 8, 2020
@testforstephen
Copy link
Collaborator

@nspeedzy thank you for sharing the video. I think I probably understand your issue. it's hanging at copying resource. Your project is a polyglot project, and you just create a Java file in a frontend project. The Java extension will initialize the whole folder as an invisible project, and the java builder tool will take the folders with the same level as the java file to be resources of your java file, and copy them to the output folder. That will take a long time to complete. See #634 (comment)

@ghost
Copy link
Author

ghost commented Apr 8, 2020

I hope you fix this error. Before i close this issue, I have one last question, Is there anything I can do to fix this problem?

@ghost ghost closed this as completed Apr 8, 2020
@ghost ghost reopened this Apr 8, 2020
@testforstephen
Copy link
Collaborator

Move the java file to a separate folder, and use vscode to open the new folder directly. besides, in your frontend project, try F1 -> Java: Clean the Java language server workspace to clean the java cache.

@ghost
Copy link
Author

ghost commented Apr 8, 2020

I am not able to clean java cache. it outputs an error: "command 'java.clean.workspace' not found"
[Actually, scratch that. I found a way to delete those files]

Anyways, Thanks for your support! I will now close this issue. If i have any more clarifications, I will reach out.

@ghost ghost closed this as completed Apr 8, 2020
@ghost ghost reopened this Apr 8, 2020
@ghost ghost closed this as completed Apr 8, 2020
@hosain-ghoraba
Copy link

In my case, there was a vscode extension that was conflicting with java extensions and making them very very slow, try to identify this problamatic extension and disable / uninstall it.

I identified that problamatic extension by looking at the extensions tab in vscode, then I noticed there was a small text beside one of them, it was : "extension (...) has reported one message, i opened that message and it said that the extension took a huge amount of time to run, so uninstalling it solved the proplem

This issue was closed.
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

No branches or pull requests

3 participants