-
Notifications
You must be signed in to change notification settings - Fork 442
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
Performance - TTFI for Reopening Previously Imported Java Projects in VS Code #3852
Comments
Hi @rgrunber, Really appreciate your willing to explain and interact. Thanks for that! This is my understadning, as far as I can tell the import process consists of 2 steaps.
Is there any steps that can be improved here, as I see that these 2 steps are always fully executed, regardless whether the project has already been imported. Though, there might be more steps, please do correct me. |
We often come back to looking at ways of improving startup times. There are basically 3-ish phases of going from the moment a project is opened in the workspace, to having vscode-java be fully ready to interact with it. I'll use JDT-LS itself as an example when importing from scratch since it's larger. (It should be noted that there are certain interactions you can perform even while certain operations are still happening) :
If you take a project that has never been imported, or run If I just re-load the VS Code window (as if I just re-opened the JDT-LS project), it takes about 4 seconds for the project import and another 3 seconds for the build phase. In other words, much quicker. One of the improvements to indexing we made was Update: I tried with https://github.com/spring-projects/spring-petclinic (imported through Gradle build metadata) and observed about the same. Took about 40s to initialize/import and another 30s to build. Reloading the project took about 3s and an additional 6s for the build. If you really wanted to cut down on time, I guess you could try disabling the autobuild ( |
@rgrunber , thank you for explanation! I've tried the peclinic as well and the results are. This is run on Arch Linux, Import
Reload/Reopen
|
I would think you should be getting better performance than me. I've only got a Dell Inc. XPS 13 9370, Intel® Core™ i7-8650U × 8, with 16 GiB RAM on Fedora 40. Are you able to share what the full language server logs look like from reload to finishing ? You could also add |
I'm seeing the exact same thing now that I started using the vscode-gradle extension (in combination with vscode-java). Note that JDT-LS has an embedded Gradle build support, but I believe for correctness the Gradle build server (which integrates with vscode-java) can be better, along with more overall support for other Gradle features. Using this basic setup, on spring-petclinic, I think a full build took about 1min while a simple reload took around 30s. That's probably closer to what you're seeing. I tried with @jdneo , is the Gradle build server likely to be a bit slower than Buildship in project import ? |
@rgrunber , what are differences between buildship and vscode-gradle? I've noticed that buildship outputs the build files into the "bin" folder, and plain gradle build outputs to "build" folder. Also, the structure of those is different. Is there a way to setup buildship to behave as plain gradle? |
I think using vscode-gradle is just closer to the expected output from commandline. T[the 'bin' folder issue is also mentioned as something vscode-gradle resolved. |
I really appreciate all the effort put into supporting Java in VS Code. I was wondering if there are any improvements that could be made to enhance the time to first interaction (TTFI) when reopening projects that have already been imported, rather than on the initial import?
The text was updated successfully, but these errors were encountered: