Skip to content
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

Opening a gradle multi-module Java Project is very slow in vs code #1334

Open
sirpan89 opened this issue May 21, 2024 · 1 comment
Open

Opening a gradle multi-module Java Project is very slow in vs code #1334

sirpan89 opened this issue May 21, 2024 · 1 comment

Comments

@sirpan89
Copy link

sirpan89 commented May 21, 2024

I Have a Gradle multi-module project, the structure looks like the one below. my gradle command in Windows terminal takes hardly 2 mins to build the entire project . but opening the same folder in vscode takes more than 30 mins showing "Importing Gradle project(s) - 70%" or "Synchronizing projects" or "Importing root project - 70% Refreshing" After import, I still see compilation errors. can anyone please help

Folder Structure
services
+--- servicea
| +--- core
| +--- host-integration
| +--- mapper-mobile
| --- mapper-web
+--- serviceb Module
| +--- core
| +--- host-integration
| +--- mapper-mobile
| --- mapper-web

output of gradlew projects

Root project 'services' - Service
+--- Project ':servicea' -servicea Module
| +--- Project ':servicea:servicea-core' -servicea Core
| +--- Project ':servicea:servicea-host-integration' -servicea Module Host Integration
| +--- Project ':servicea:servicea-mapper-mobile' -servicea Module Mobile Mappers
| --- Project ':servicea:servicea-mapper-web' -servicea Module Web Mappers
+--- Project ':serviceb' - serviceb Module
| +--- Project ':serviceb:serviceb-core' - serviceb Module Core
| +--- Project ':serviceb:serviceb-host-integration' - serviceb Module Core
| +--- Project ':serviceb:serviceb-mapper-mobile' - serviceb Module Mobile Mappers
| --- Project ':serviceb:serviceb-mapper-web' - serviceb Module Web Mappers

i have attempted to open the project in vscode after running below set of commands, nothing helped as well

attempt 1:
gradlew clean
gradlew eclipseClean

attempt 2:
gradlew clean
gradlew eclipseClean
gradlew

attempt 3:
gradlew clean
gradlew eclipseClean
gradlew eclipse

none of the attempts improved the performance, also I have tried the fixes mentioned in

NOTE: I have total 17 services similar to servicea, serviceb etc..

Environment:

  • VS Code Version:1.89.1
  • Extension Version:
  • Language Support for Java(TM) by Red Hat : v1.31.20240
  • gradle for Java : v3.13.5
  • Extension Pack for Java : v0.26.0
  • JDK Type & Version: 21
  • OS Type & Version:

.project

<?xml version="1.0" encoding="UTF-8"?> <projectDescription> <name>servicea</name> <comment>Service A</comment> <projects> </projects> <buildSpec> <buildCommand> <name>org.eclipse.jdt.core.javabuilder</name> <arguments> </arguments> </buildCommand> <buildCommand> <name>org.eclipse.buildship.core.gradleprojectbuilder</name> <arguments> </arguments> </buildCommand> </buildSpec> <natures> <nature>org.eclipse.jdt.core.javanature</nature> <nature>org.eclipse.buildship.core.gradleprojectnature</nature> </natures> <filteredResources> <filter> <id>1</id> <name></name> <type>10</type> <matcher> <id>org.eclipse.core.resources.regexFilterMatcher</id> <arguments>node_modules|.git</arguments> </matcher> </filter> <filter> <id>2</id> <name></name> <type>10</type> <matcher> <id>org.eclipse.ui.ide.multiFilter</id> <arguments>1.0-name-matches-false-false-node_modules</arguments> </matcher> </filter> <filter> <id>3</id> <name></name> <type>10</type> <matcher> <id>org.eclipse.ui.ide.multiFilter</id> <arguments>1.0-name-matches-false-false-build</arguments> </matcher> </filter> <filter> <id>4</id> <name></name> <type>10</type> <matcher> <id>org.eclipse.ui.ide.multiFilter</id> <arguments>1.0-name-matches-false-false-javadoc</arguments> </matcher> </filter> <filter> <id>1716307971023</id> <name></name> <type>30</type> <matcher> <id>org.eclipse.core.resources.regexFilterMatcher</id> <arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments> </matcher> </filter> </filteredResources> </projectDescription>

@pmingkr
Copy link

pmingkr commented Aug 21, 2024

This issue happens to me randomly. and it shuts down my task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants