Very slow update/refresh with Gradle multi project including non Java project with large number of files
See original GitHub issueHi,
I’m using a multi project build with a Spring Boot backend and an Angular frontend.
The Gradle build is used to create a jar for the frontend that serves as a dependency for the Spring Boot project.
Each project has its own build.gradle
file. No issues there.
The problem is that the Java Language Server spends a large of amount of time (~15 minutes) updating and refreshing the root project. It seems that this is due to the large amount of files in the frontend project (node_modules
) because removing this directory considerably improves the refresh time. Also, completely removing the frontend project makes everything work quickly as expected.
The refresh is slow even when the frontend project is not referenced at all in the Gradle build (not declared as a subproject and not referenced as a dependency).
Using the Gradle CLI, everything works normally. Configuration is fast.
I tried to remove the build.gradle
files from the frontend project and configure it from the root project’s build.gradle
but same result.
Is the Language Server indexing or browsing all the files from the frontend project even though it is not a Java project? Is there any way to make it ignore files or directories or non Java projects?
Thanks for your pointers.
Environment
- Operating System: Windows 10 Pro
- JDK version: openjdk11
- Visual Studio Code version: 1.43.2
- Java extension version: 0.59.0
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:27 (11 by maintainers)
@a-st @jsaulou You can try to add the following code:
to your build.gradle file.
buildship doesn’t support Eclipse resource filters. See https://github.com/eclipse/buildship/issues/271 You can add them to your .project file using the following command:
I also recently noticed a large increase in the time required to synchronise the project. I too have a project with a nested
node_modules
folder. While ignoringnode_modules
as per above comments helped, it was still taking a while. I reverted the plugin back to v61 and sync speed dropped back to only a few seconds.Has anything changed in v62 that could have caused this?