redhat-developer / vscode-java

Java Language Support for Visual Studio Code
Eclipse Public License 2.0
2.08k stars 442 forks source link

Some questions about the experience #3024

Open MrYZhou opened 1 year ago

MrYZhou commented 1 year ago
Environment

1. The code recommendations are slow when driving large projects. But I didn't find this problem at idea

2. Unable to easily configure the jdk version for each project

snjeza commented 1 year ago

The code recommendations are slow when driving large projects.

@MrYZhou Could you provide a project example?

Unable to easily configure the jdk version for each project

What projects are you using? maven, gradle, eclipse...

MrYZhou commented 1 year ago

The code recommendations are slow when driving large projects.

@MrYZhou Could you provide a project example?

Unable to easily configure the jdk version for each project

What projects are you using? maven, gradle, eclipse...

Unfortunately, I cannot provide the source code for this project because it is an internal company project.

1. You can try it yourself when there are thousands of classes and dozens of modules. Code suggestions are indeed much slower than when there were only a few. Reached 2 seconds. This is almost unbearable time. Especially when obtaining entity attributes, such as waiting for "getName" to appear. This bad experience will lead me to give up using vscode

I am willing to use more memory to improve performance and be able to respond quickly

  1. I use maven to build projects

snjeza commented 1 year ago

Unable to easily configure the jdk version for each project

You may want to take a look at

I am willing to use more memory to improve performance and be able to respond quickly

Could you try to set the following properties?

 "java.jdt.ls.vmargs": "-Dlog.level=ALL -Djdt.ls.debug=true -XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx16G -Xms1G -Xlog:disable",
 "java.references.includeAccessors": false,
 "java.inlayHints.parameterNames.enabled": "none",
 "java.implementationsCodeLens.enabled": false,
 "java.referencesCodeLens.enabled": false,
 "java.configuration.maven.defaultMojoExecutionAction": "ignore"
 "java.completion.postfix.enabled": false,
 "editor.snippetSuggestions": "none",
 "java.completion.matchCase": "off",
 "java.completion.maxResults": 50,

and your server log? - Enable logging

Could you show your settings.xml and pom.xml?

MrYZhou commented 1 year ago

无法为每个项目轻松配置 jdk 版本

你可能想看看

我愿意使用更多的内存来提高性能并能够快速响应

您可以尝试设置以下属性吗?

"java.jdt.ls.vmargs": "-Dlog.level=ALL -Djdt.ls.debug=true -XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx16G -Xms1G -Xlog:disable",
"java.references.includeAccessors": false,
"java.inlayHints.parameterNames.enabled": "none",
"java.implementationsCodeLens.enabled": false,
"java.referencesCodeLens.enabled": false,
"java.configuration.maven.defaultMojoExecutionAction": "ignore"
"java.completion.postfix.enabled": false,
"editor.snippetSuggestions": "none",
"java.completion.matchCase": "off",
"java.completion.maxResults": 50,

和您的服务器日志?- 启用日志记录

你能展示你的设置.xml和绒球.xml吗?

image "Every time you open a project, it takes several minutes to index it. Can't this cache or speed up indexing?". And I couldn't start the project at first, and it would display "vscode Failed to debug the project because of invalid project node. This command only applies to Project Explorer view."