Vscode-java: intellisense is so slow in showing suggestion

Created on 19 Dec 2016  路  14Comments  路  Source: redhat-developer/vscode-java

This happens every time working on any java project in vscode with the extension applied, with quick suggestions enabled, even if when i stop writing and waiting for the suggestions to appear it take long time to appear.
When i stop typing and pressing cmd+space instead it shows loading for a while until it shows the suggestions in the Intellisense.

Environment
  • Operating System: Mac os
  • JDK version: 1.8.0_45
  • Visual Studio Code version: 1.8.0
  • Java extension version: 0.0.7
content-assist enhancement performance

Most helpful comment

We also calculate the replacement strings upfront for all completions so it is probably affecting the performance. There is some room for improvement.

All 14 comments

How big is your project? Nb of classes, dependencies?
Have you tried increasing the amount of memory given to the Java Language server? In the user or workspace preferences, add

"java.jdt.ls.vmargs":"-Xmx1G"

Or more memory

It's large with a large number of dependencies and classes. I have already increased the amount of memory but no changes has happened still slow suggestions.
Also when i created a small project with 2-5 dependencies it still showing suggestions slowly.

Have you tried importing the project in Eclipse? How does it compare?

no i was mainly using intellij only

can you do a screencast of the small project exhibiting slow content assist?

here it is

Also in case i typed all small case word it appears wrong in the suggestions like system instead of System. I believe this is not the case in all words like the one in the screen case sortedset.

Ok, it's a bit slow. I'm not sure we can improve that from our side, since we're calling Eclipse JDT under the hood. @gorkem is the content-assist expert :-)

And yeah we still have a bit of work to do on the relevance part

We also calculate the replacement strings upfront for all completions so it is probably affecting the performance. There is some room for improvement.

@gorkem indeed, it's much snappier when commenting that line in CompletionProposalRequestor:

this.proposalProvider.updateReplacement(proposal,$, '\0',new ArrayList<Integer>());

So now we need to find a way to compute the replacement at the moment the proposal is selected. No idea how to do it (it doesn't look like a command is sent at that moment)

Hi, I am currently having the same issue. There are 4 files in the folder and 1 jar and the intellisense is quite slow.

@Marti2203 can you try disabling all other Java extensions, see if performance improves?

Yes, the performance got a lot better - all 12 cores are now at 50% for a small period of time and not at 100%. I had the java extension pack only, this is quite strange.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jcjolley picture jcjolley  路  3Comments

ViniciusAtaide picture ViniciusAtaide  路  4Comments

BuZZ-dEE picture BuZZ-dEE  路  4Comments

gorkem picture gorkem  路  4Comments

zalcorshark picture zalcorshark  路  3Comments