redhat-developer / vscode-java

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

bug: 🐛 VSCode JLS error when loading project with lot of Maven sub modules #3637

Closed philippart-s closed 4 months ago

philippart-s commented 5 months ago

As discussed here: https://quarkusio.zulipchat.com/#narrow/stream/187038-dev/topic/Are.20there.20any.20.20VSCode.20users.20to.20develop.20Quarkus.20extensions.3F

When I open the project quarkus-langchain4j JLS take a long, long, long time to scan the project (more than 30 minutes) and end with an error and propose to increase the memory. Even if I set the memory to 32 Go the error occurs.

Environment
Steps To Reproduce
  1. clone the repository quarkus-langchain4j
  2. open the project in VSCode
  3. wait JLS scanning the project

Please attach logs

Current Result

Error message and project not parsed by JLS

Expected Result

No error, scan faster and project usable.

Additional Informations

image JLS.log

rgrunber commented 5 months ago

I tried this on Linux and also noticed a good amount of memory consumption around the build phase (less so during project import). Ultimately the project successfully built (-Xmx1G, which is the default) with no errors (just warnings/info), but it did peak at around 850MB. Overall, it finished importing at 3min, and a total of 5min from startup to complete building. 30min seems like it's running out of memory and basically just thrashing.

I did notice from the logs you have the Quarkus integration installed as well so I'll try that also. If you disable both the MicroProfile and Quarkus extensions, does project import+build become less slow ?

Update: Even with the latest Quarkus extension, I'm not seeing it taking more than a maybe 5min to complete all operations.

maxandersen commented 5 months ago

I can confirm i simply can't import this project on osx Mac studio. Had to "increase memory" 3-4 times before it stopped crashing almost immediately.

philippart-s commented 5 months ago

I did notice from the logs you have the Quarkus integration installed as well so I'll try that also. If you disable both the MicroProfile and Quarkus extensions, does project import+build become less slow ?

I tried without these extensions and same result.

snjeza commented 4 months ago

@philippart-s @maxandersen @rgrunber Could you, please, try VS Code 1.32.0?

philippart-s commented 4 months ago

@philippart-s @maxandersen @rgrunber Could you, please, try VS Code 1.32.0?

What is this version?

snjeza commented 4 months ago

What is this version?

This is the specific .vsix that includes this PR - See Install from a VSIX

philippart-s commented 4 months ago

@snjeza I've just tested 12.32.0 and my project is fully operational (Java ready in the status bar) in less than 2 minutes and it's usable in less than 30 seconds 😉 .