So I’ve spent quite a time combing through build scans on this. Gradle profiler isn’t an option here because the issue only manfiests itself in Jenkins, not on local. If I need to install gradle profiler in jenkins, that will take significantly more work, but we’ll see. There are two traits that I’ve been able to correlate so far:
• Number of tasks created during task graph calculation. The gradle docs say this is a best practice, but I’m still keeping an eye on it.
• Time spent fingerprinting task inputs. In builds with the long task graph calculation time, I’m seeing over an hour spent on this (i assume that’s serial time, not real time). In builds with a shorter task graph calculation, I’m seeing anywhere from 30 seconds to 3 minutes spent.