-
Notifications
You must be signed in to change notification settings - Fork 414
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
faster plugin startup #336
Comments
vscode-java already reuses the same workspace than the last time the folder was opened. From what I see in your screenshot, there doesn't seem to be many Maven modules, unless there's a deeper module hierarchy. So 15min to rebuild seems really excessive. |
My development machine is actually a VM and I do have a bunch of VSCode extensions active alongside with vscode-java. I have been trying to get some measurements either using my project and also this one https://github.com/google/guava, both on my VM and host machine with only vscode-java extension enabled. The following are some average measurements of time the vscode-java needs to be ready: Host machine: VM machine: These results are reproducible on my machine. My project has 12 modules and 506 java files (not as big as I thought) I can't share the original pom files, but I'm happy to share them with the project and company names "obfuscated". |
@snovo so CLI build takes 2 mins max in your VM? |
@snovo what do you measure exactly to determine the build is finished in vscode? |
Windows always had terrible terrible I/O perf, I see that hasn't changed with Win 10 apparently :-( Running mvn clean test-compile would be a more accurate comparison with what vscode-java actually does. It takes 40sec to compile all files from guava on my MacBook Pro from CLI. Looking at the Language Support for Java output logs, between the 1st line to the last one after server reaches 100% startup, a "cold" import takes about 47sec, and a "hot" one is about 10sec slower. So this definitely doesn't work as expected. It should be much faster instead. |
Hi fbricon, As a measurement, I was looking for the status progress (percentage) of the extension and calculating the difference between the time it reaches 100% and when the percentage first showed up in the UI. Btw, I just tried out "mvn clean test-compile" with guava and it took 1:47 min. Executing "mvn test-compile" took 40seconds afterwards. You can find the vscode-java log file for guava which contains 2 sessions. The first one is related to a clean compilation and the second one related to a hot compilation (reusage of the workspace): I used to use IntelliJ and it was much faster after the cold/clean compilation. That's why I thought the workspace wasn't being reused at all. |
I think the problem comes from our systematic re-import of the projects, when the workspace is reopened. If the projects already exist in the underlying workspace, we might just refresh them and stop there. Hopefully that might help. |
So even when skipping the maven import when the project already exists, it still takes a minute to start. The server seems to execute a full build, which is what's taking a very long time to run. |
let me know if you need more info |
@snovo still banging my head on it |
Also, avoid importing already existing Maven projects and trigger "Update project configuration" asynchronously to reduce server startup response time. When opening https://github.com/google/guava a 2nd time the server is ready in ~2-3 sec, instead of 1min. Fixes redhat-developer/vscode-java#336 Signed-off-by: Fred Bricon <fbricon@gmail.com>
Also, avoid importing already existing Maven projects and trigger "Update project configuration" asynchronously to reduce server startup response time. When opening https://github.com/google/guava a 2nd time the server is ready in ~2-3 sec, instead of 1min. Fixes redhat-developer/vscode-java#336 Signed-off-by: Fred Bricon <fbricon@gmail.com>
Also, avoid importing already existing Maven projects and trigger "Update project configuration" asynchronously to reduce server startup response time. When opening https://github.com/google/guava a 2nd time the server is ready in ~2-3 sec, instead of 1min. Fixes redhat-developer/vscode-java#336 Signed-off-by: Fred Bricon <fbricon@gmail.com>
You can download the most recent |
Try to disable virus scanning on the project folder if you trust the sources. That helped to speed up my build times a lot. |
this extension is great but it takes far too much time to be ready as it seems to be rebuilding the workspace everytime a new project/folder is loaded.
opening a medium size project takes up to 15min to rebuild the workspace...
wondering if it wouldn't be possible to reuse the workspace from the last session and provide an option to rebuild the workspace if necessary...
Environment
Steps To Reproduce
current folder structure takes up to 15minutes to load:
The text was updated successfully, but these errors were encountered: