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

Very poor performance with Gradle build #13095

Closed
vitalyster opened this issue May 8, 2018 · 5 comments
Closed

Very poor performance with Gradle build #13095

vitalyster opened this issue May 8, 2018 · 5 comments
Labels
for: external-project For an external project and not something we can fix status: invalid An issue that we don't feel is valid

Comments

@vitalyster
Copy link

I did start the discussion in Gradle issue tracker and we think a problem is in Spring Boot Gradle plugin. I can share build scans and anything else to find the root of the problem

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label May 8, 2018
@wilkinsona
Copy link
Member

I suspect that this may be due to the dependency management plugin creating and resolving a detached configuration to apply Maven-style exclusions to you build.

You said on the Gradle issue that it "takes ages" said in the title that performance is "very poor". Can you please quantify ages and very poor? It's impossible to diagnose a performance problem with subjective descriptions of the time that's taken.

I can share build scans

Yes please.

anything else to find the root of the problem.

A sample project that reproduces the problem would be very useful.

@wilkinsona wilkinsona added the status: waiting-for-feedback We need additional information before we can continue label May 8, 2018
@vitalyster
Copy link
Author

Cumulative time spent resolving dependencies 5m 18.718s

Here is the build scan - https://scans.gradle.com/s/odpmjdnsiw3em

sample project

I suspect small sample project will be faster, but I will try to create it

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels May 8, 2018
@wilkinsona
Copy link
Member

Thanks. Unfortunately, the scan doesn't tell us that much. For example, information about how many dependencies each project in your build has and what those dependencies are would be useful.

Of the total dependency resolution time, resolving detached configurations takes 152.216 seconds. That's slightly less than half of the 318.718s total time. Both seem high, but, again, it's impossible to know if it is high without more information. Are all of the dependencies cached? Or is this including time to download dependencies?

To test my theory about the time being spent applying Maven-style exclusions, you could try disabling them. You may then have to add some additional exclusions to your projects' dependencies as Gradle doesn't handle exclusions in a pom as Maven intends them to be handled.

@wilkinsona wilkinsona added status: waiting-for-feedback We need additional information before we can continue and removed status: feedback-provided Feedback has been provided labels May 8, 2018
@vitalyster
Copy link
Author

with applyMavenExclusions = false:

Cumulative time spent resolving dependencies 1m 18.888s

(this includes dowload time of tomcat-annotations-api.jar which was not needed before somehow)

removing that line and again:

Cumulative time spent resolving dependencies 5m 11.929s

(all dependencies are cached, no "download" message)

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels May 8, 2018
@wilkinsona
Copy link
Member

That's useful info, thanks. I don't understand the drop from 5m 11 to 1m 18 given that the detached configurations were, apparently, only responsible for 2m 32. Perhaps it's a quirk of how the build scan measures the time taken.

If you don't want to disable Maven exclusion handling and would like to pursue the possibility of making this faster, please open an issue against the dependency management plugin providing a sample that reproduces the problem.

@wilkinsona wilkinsona added status: invalid An issue that we don't feel is valid for: external-project For an external project and not something we can fix and removed status: feedback-provided Feedback has been provided status: waiting-for-triage An issue we've not yet triaged labels May 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: external-project For an external project and not something we can fix status: invalid An issue that we don't feel is valid
Projects
None yet
Development

No branches or pull requests

3 participants