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

Avoid unnecessary project updates when the default vm changes #2266

Merged
merged 1 commit into from
Oct 11, 2022

Conversation

testforstephen
Copy link
Contributor

@testforstephen testforstephen commented Oct 9, 2022

Fixes part of the issue #1960, the reason is that JDT triggers unnecessary update with the default vm change. (See the analysis from the PR #1961).

See the TODO in the following snippet, we should trigger project update only if the project importer uses the default vm.
https://github.com/eclipse/eclipse.jdt.ls/blob/f8452b422add64f9bbc80d0e22b48ed71797e563/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/JVMConfigurator.java#L305-L309

Since the Eclipse and Maven project importer doesn't depend on the default vm, I changed it to only trigger update for gradle projects. Also, see the earliest PR #1430 that introduced this snippet, where it exactly is used to solve gradle import issue.

@testforstephen
Copy link
Contributor Author

With this PR, I no longer see project update notifications when I reload eclipse.jdt.ls. The language server ready time can be dropped from 1min20s to 40s. The default vm change from vscode-pde doesn't force update eclipse.jdt.ls projects.

Copy link
Contributor

@jdneo jdneo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@testforstephen testforstephen added this to the End October milestone Oct 11, 2022
@testforstephen testforstephen merged commit 1e119f9 into eclipse-jdtls:master Oct 11, 2022
@testforstephen testforstephen deleted the jinbo_defaultvm branch October 11, 2022 03:06
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

Successfully merging this pull request may close these issues.

3 participants