Gradle plugin constantly spinning CPU

已回答

I have an issue with IntelliJ which has continued through multiple releases including IU-223.7571.58

The gradle plugin is constantly taking CPU, even when intelliJ has been idle for a long time, and when there are no ongoing tasks being reported.

It's almost as if it's constantly reparsing the gradle build files (there are >300 of them in the project)

For example

 %CPU  Subsystem

167.2  <Process total CPU usage>
 86.8  Plugin Gradle DSL API: com.android.tools.idea.gradle.dsl.parser.elements
 39.4  <Garbage collection>
  6.3  Plugin Gradle DSL API: com.android.tools.idea.gradle.dsl.parser.groovy
  2.5  lang.impl (in com.intellij)
  2.1  <unidentified: UI thread>
  1.8  <unidentified: Java2D Queue Flusher>
  1.8  <Activity Monitor>

What's also noticeable is that memory is constantly being allocated/garbage collected, probably caused by this parsing.

Occasionally it will settle down, but it can be a long long time (hours) - the actual build can be done in a few minutes (if fvt excluded)

I opened up a YouTrack issue over a month ago, but there's little progress so far
see https://youtrack.jetbrains.com/issue/IDEA-304093/IntelliJ-EAP-New-UI-leaks-CPU-in-gradle-task-com.android.tools.idea.gradle.dsl.parser.elements

Is anyone else seeing anything similar? Any workarounds/mitigations?

This is frustrating as we are moving over to gradle from maven, and if all my colleagues get this they won't be happy .... 

I should clarify that the gradle build works fine, both locally and for full ci/cd - but there is definately some issue with IntelliJ and the gradle plugin

I am using the gradle wrapper, and are at version 7.5.1. OS is macOS

0

Hi Nigel,

The investigation in IDEA-304093 is ongoing. As is internal communication inside the ticket, which you cannot see because the comments are only visible to JB team. I asked the Dev team to share their findings publicly.

0

Unfortunately nothing yet - the issue persists with current (release+eap ) builds

0
I updated the status of the issue to reflect the latest affected version. Hopefully, there will be an update soon. Thanks for your patience.
0

请先登录再写评论。