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

Code autocomplete and reference hint are slow in java JDK 9.0.1 #398

Closed
khe817 opened this issue Dec 27, 2017 · 3 comments
Closed

Code autocomplete and reference hint are slow in java JDK 9.0.1 #398

khe817 opened this issue Dec 27, 2017 · 3 comments

Comments

@khe817
Copy link

khe817 commented Dec 27, 2017

Code autocomplete and reference hint are significantly slower (5 to 10 seconds waiting for hints to load) in Java JDK 9.0.1 with maven projects as compared to previous Java JDK versions (1.7.x, and 1.8.x) (hints are loaded under 1 second). Half of the time, hints don't load at all.

Environment
  • Operating System: windows 10
  • JDK version: 9.0.1
  • Visual Studio Code version: 1.19.1
  • Java extension version: 0.16.0
Additional information
  • Maven pom.xml configurations:
<properties>
	<java.version>9</java.version>
</properties>

If java.version is set to 1.8 in pom.xml, code completion and reference hints work fine.

@fbricon
Copy link
Collaborator

fbricon commented Jan 15, 2018

Performance is indeed abyssmal.

slow-jdk9

We need to check if updating to a newer version of JDT helps or if there's something truly broken in jdt.ls.

Performance seemed to be linked to the amount of opened Java classes in the workspace. On every keystroke, we're evicting/rebuilding the AST cache for all files and revalidating everything. For the same project, with 7 files opened, validation seems to be 10 times slower on jdk9.

@fbricon
Copy link
Collaborator

fbricon commented Jan 26, 2018

Seems fixed with the update to Eclipse Photon in the latest jdt.ls builds

@fbricon fbricon closed this as completed Jan 26, 2018
@khe817
Copy link
Author

khe817 commented Feb 1, 2018

I updated to the newest released version (0.18.1). The issue is now worse with no code completion popping up at all when I type an object and wait for its functions hints to show.

Reference hint, peek definition (Alt+F12), and go to definition (F12) for classes defined in a local project (vs classes from imported package in pom.yml) also now do not work. An error "No definition" pops instead.

Reference hint, peek definition (Alt+F12), and go to definition (F12) also do not work for java core classes like List, String, ArrayList ...

I have open a new issue: #428

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants