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

Performance issue when enabling Build Server #1441

Open
jdneo opened this issue Oct 25, 2023 · 16 comments
Open

Performance issue when enabling Build Server #1441

jdneo opened this issue Oct 25, 2023 · 16 comments
Labels
bug Something isn't working

Comments

@jdneo
Copy link
Member

jdneo commented Oct 25, 2023

See: redhat-developer/vscode-java#3357

          Wow, so slowly. I have to wait 30 minutes after opening the project for it to run. I don't know the cause yet, I hope the development team soon finds the cause.

image

Originally posted by @alexanderloong in redhat-developer/vscode-java#3357 (comment)

@jdneo
Copy link
Member Author

jdneo commented Oct 25, 2023

One thing we can explore is to avoid Gradle building the workspace right after import. Instead, let it build before launch/test

@alexanderloong
Copy link

Thanks, my problem has been resolved. People can go into setting and choose it.
image

@mbruce
Copy link

mbruce commented Mar 20, 2024

This is still the #1 issue with this plugin. I have a project I can open in IntelliJ in a few minutes. But it's over an hour every time in vscode. It's completely unusable.

@Yazington
Copy link

2024 and this is still an issue

@mbruce
Copy link

mbruce commented Jun 22, 2024

2024 and this is still an issue

Yep, still terribly slow.

@mbruce
Copy link

mbruce commented Nov 10, 2024

Keeping this alive. Still terribly slow.

@jdneo
Copy link
Member Author

jdneo commented Nov 11, 2024

@mbruce Have you tried the pre-release version?

@mbruce
Copy link

mbruce commented Nov 11, 2024 via email

@jdneo
Copy link
Member Author

jdneo commented Nov 12, 2024

@mbruce Could you share the server log? Run Java: Open Java Language Server Log File

@devondragon
Copy link

log.txt

@jdneo - I'm having the same issue and here is my log file while it's slowly loading

@devondragon
Copy link

FWIW I am not having this issue with VS Code Insiders, just the main VS Code release version.

@jdneo
Copy link
Member Author

jdneo commented Nov 22, 2024

FWIW I am not having this issue with VS Code Insiders, just the main VS Code release version.

@devondragon I'm shocked that they perf can be different between vscode release and insiders. Is there any setup difference between two? For example, different extensions are installed?

@rgrunber
Copy link

in vscode-java, there are setting that are set to auto, which means disabled by default in VS Code, but enabled in VS Code Insiders (they're experimental settings we wish to enable by default eventually) !

I was just investigating redhat-developer/vscode-java#3904 and one odd behaviour I ran into was that if "Gradle for Java" was installed, after the first "Java: Clean Language Server Workspace" command, all other reloads of the window caused the index to be rebuilt every time. The project itself was Maven and unrelated to Gradle. Either way this shouldn't happen as nothing has changed. At first I never ran into this because I always ran with java.sharedIndexes.enabled": "on", but this setting has an auto value which means it behaves differently in the Insiders release.

@devondragon , does setting java.sharedIndexes.enabled": "on" improve performance for you ? There's still probably something else going on because I the build finishes every time but worth a try.

@devondragon
Copy link

That seems to improve things considerably! Thanks!!

@rgrunber
Copy link

rgrunber commented Feb 25, 2025

I think I found another problem. Probably the root one.

ResourcesPlugin.getWorkspace().addSaveParticipant(JavaCore.PLUGIN_ID, this);

vscode-gradle is contributing a participant under the id org.eclipse.jdt.core. But jdt.core has its own participant that you're kicking out 😛 . See https://github.com/eclipse-jdt/eclipse.jdt.core/blob/4d5b78631454da002130f609615dcca34b635574/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelManager.java#L5448. So what does the jdt.core participant do ? Oh not much, just making sure the external library timestamps get saved correctly : https://github.com/eclipse-jdt/eclipse.jdt.core/blob/4d5b78631454da002130f609615dcca34b635574/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelManager.java#L4709https://github.com/eclipse-jdt/eclipse.jdt.core/blob/master/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelManager.java#L4797-L4798 . Without that they aren't saved, and later on we re-index the library because the old timetsamp is nowhere to be found, but the new one exists : https://github.com/eclipse-jdt/eclipse.jdt.core/blob/4d5b78631454da002130f609615dcca34b635574/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/DeltaProcessor.java#L1067-L1069 . Luckily this seems like an easy fix.

(Oh, and disabling vscode-gradle isn't enough to make the problem go away because we use extensions.all when collecting contributions on the vscode-java side, and that doesn't seem to exclude disabled/uninstalled extensions)

@mbruce
Copy link

mbruce commented Feb 26, 2025

no luck for me with that setting. still takes forever to index, and sits on 32% for at least an hour.

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

6 participants