Upgrading Gradle plugin from causes scan to take 1.5 hours

Template for a good new topic, formatted with Markdown:

  • ALM used GitHub
  • CI system used Jenkins
  • Scanner command used when applicable (private details masked)
  • Languages of the repository - Kotlin
  • Only if the SonarCloud project is public, the URL
    • And if you need help with pull request decoration, then the URL to the PR too
  • Error observed (wrap logs/code around with triple quotes ``` for proper formatting)
  • Steps to reproduce
    Upgrade gradle plugin from to causes the scan to take 1.5hours. Using the old version it takes 5 minutes.
  • Potential workaround

Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!

I can share a full log privately if need be.

1 Like

Anybody from sonar care to follow up on this?

Hello @Nikolay_Metchev,

Thank you for reaching out, I was checking what changes may have caused such a performance penalty, and there is a commit that may have added computational complexity: Avoid nested paths in sonar.sources/sonar.tests.

In order to speed up the investigation it would be of help to have the logs and, more importantly, a reproducer. Could you provide such info? It would be great to have a zip file with a small project on which the scanner command takes longer than expected.


The site doesn’t appear to have private messages anymore. I can’t post the logs on a public forum.

Hello Nikolay,

Please excuse the delay.

Based on the logs you provided, there seem to be a couple of unexpected behaviors playing together to create this long scan time. I have created two tickets to track these bugs here and here. We are planning to work on some related work soon anyway, during which we may well be able to address this issue.

Until this is fixed, I would suggest not upgrading to the latest plugin version in this particular case.

Hi it seems version is quick again. Can you confirm this to be the case?

Hi Nikolay,

We have implemented several improvements for the Gradle scanner recently, including some targeting performance. We also made some other changes, such as removing the dependency on the compile task.

It is worth a try to see if it fixes your issue. Don’t hesitate to let us know if you see any unexpected results or behavior.