jbosstools / jbosstools-quarkus

Quarkus tooling for Eclipse
https://tools.jboss.org
Apache License 2.0
16 stars 20 forks source link

Code navigation is slow when running on 2023-06 #235

Open lfcortesco opened 11 months ago

lfcortesco commented 11 months ago

The source code navigation is too slow after installing the plugin. After executing cmd+click to go the class clicked, it hangs for about 10 seconds and then opens the file. In the meantime, it shows up the loading indicator. It doesn't happen before the plugin installation. I found this trace in the error log:

java.util.concurrent.ExecutionException: org.eclipse.lsp4j.jsonrpc.JsonRpcException: java.io.IOException: Stream closed at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396) at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2096) at org.eclipse.lsp4e.LanguageServerWrapper.lambda$10(LanguageServerWrapper.java:453) at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804) at java.base/java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1796) at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) Caused by: org.eclipse.lsp4j.jsonrpc.JsonRpcException: java.io.IOException: Stream closed at org.eclipse.lsp4j.jsonrpc.json.StreamMessageConsumer.consume(StreamMessageConsumer.java:72) at org.eclipse.lsp4e.LanguageServerWrapper.lambda$3(LanguageServerWrapper.java:283) at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.request(RemoteEndpoint.java:161) at org.eclipse.lsp4j.jsonrpc.services.EndpointProxy.invoke(EndpointProxy.java:91) at jdk.proxy12/jdk.proxy12.$Proxy34.shutdown(Unknown Source) at org.eclipse.lsp4e.LanguageServerWrapper.lambda$10(LanguageServerWrapper.java:451) ... 7 more Caused by: java.io.IOException: Stream closed at java.base/java.lang.ProcessBuilder$NullOutputStream.write(ProcessBuilder.java:445) at java.base/java.io.OutputStream.write(OutputStream.java:162) at java.base/java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:81) at java.base/java.io.BufferedOutputStream.flush(BufferedOutputStream.java:142) at org.eclipse.lsp4j.jsonrpc.json.StreamMessageConsumer.consume(StreamMessageConsumer.java:69) ... 12 more

The following are the versions used for testing:

Version: 2023-06 (4.28.0) Build id: 20230608-1333 Java version: 17

Additionally, I attached a short videoclip showing the behavior.

https://github.com/jbosstools/jbosstools-quarkus/assets/86127332/4458e464-7030-4e26-ac8e-a08e74f12e0c

angelozerr commented 11 months ago

Your stack trace seems to be a bug of LSP4E or perhaps you MicroProfile language server cannot be started correctly.

It seems that you server is stopped or something like this and it try to restart the server which takes some times.

Have tou application.properties completion feature?

lfcortesco commented 11 months ago

Do you mean the language server for properties files? I have this: image

If I unchecked that one, the behavior is the same.

angelozerr commented 11 months ago

Yes it is that, there is one of language server mapped with Java file which causes problem.

It seems you try with Java file. Try to disable : image

and after try check one to see which language server causes problems.

Have you completon in application.properties?

lfcortesco commented 11 months ago

The following config works well:

image

However, after activating Qute or Quarkus only, it is slow again.

angelozerr commented 11 months ago

Ok it means that Qute / Quarkus language server cannot be started.

Have you another traces?

lfcortesco commented 11 months ago

Here's the log file. eclipse.log

angelozerr commented 11 months ago

It seems language server cannot be started but why? It misses some logs I think that JBoss Quarlu sshouldadd like the start command of the ls.

Let's wait for @sbouchet back to discussabout that and discover your problem.

Thanks for sharing your log

sbouchet commented 8 months ago

@lfcortesco : i'm about to release a new version, based on 4.29, with newer version of Qute and Quarkus LS . Can you provide a sample ?

lfcortesco commented 8 months ago

@sbouchet That behavior is for any project, even for other Java projects.

angelozerr commented 8 months ago

@sbouchet I think the problem was about language servers was not ableto start and in LSP4E there are so many timeout which freezes the Eclipse IDE UI when language server cannot be started.

So I think no wyou have fixed this start, I think it will fix this issue.

sbouchet commented 8 months ago

ok then, please update to new version that fixes LS starts as soon as it will be out.