Closed kazuki-ma closed 3 years ago
In my case, if setApplyMavenExclusions(false)
is set isDependencyOnLocalProject
is one hotspot.
In my caseisDependencyOnLocalProject
occupied 12,540 samples by profiler (25,460 samples total).
It's about 50% of CPU usage.
Graphs below.
Full width = all java code execution during IntelliJ reload. Except GC time.
Highlighted width = isDependencyOnLocalProject
execution.
This is because gradle's .getAllprojects()
is heavy and not optimized for frequency call.
This hotspot executes every (project x configuration x dependency pair) 😢 .
Anyway, in this use case, we can cache local project name.
Another reason of why gradle realod is heavy is applyMavenExclusions
.
Note: There is workaround. put setApplyMavenExclusions(false)
.
There are any significant difference in my case. (example: protobuf module is exclude from MySQL connector or not)
Thanks for the report. The support for Maven-style exclusions has been through a few rounds of optimisation and I think it's as fast as it can reasonably be. Caching the local project names sounds like a good thing to do. We can use #289 to do that (thanks for the PR).
(Moved from https://github.com/spring-projects/spring-boot/issues/24612)
Problems
We have large scale server side project using spring-boot gradle plugin. (~200 modules)
After using spring-boot dependency management, IntelliJ idea gradle reload tooks over 2 minutes. If I set
setApplyMavenExclusions(false)
it reduced to 30 seconds. (improved. But I thinks it's not best).Goal
If you have any idea (Known limitation, option or workaround etc..) please let me know.