[Migration 2.X] Very slow initialize task due to fingerprints

Hello,

Tool Version
Gradle 8.14
IntelliJ Platform Gradle Plugin 2.5.0

I am trying to migrate our plugin from 1.X to 2.X, and after battling for quite a long time, I managed to get it working. I have one remaining issue, it’s taking a very long time to build now.

The main issue is the InitializeIntelliJPlatformPluginTask task that used to take less than a second, it’s now taking more than 2 minutes due to the fingerprinting of inputs, as seen by the following screenshots from Develocity:

Before

After

I have multiple modules and each of them is taking 2+ minutes to get this task done. Each module uses a different local installation, as such:

dependencies {
    intellijPlatform {
        local(riderHome)
        testFramework(TestFrameworkType.Platform)
    }
}

In the logs, I see the following:

> Task :rider:initializeIntellijPlatformPlugin
Caching disabled for CollectorTransformer: /opt/rider because:
  Caching not enabled.
Caching disabled for task ':rider:initializeIntellijPlatformPlugin' because:
  Task is untracked because: Should always run
Task ':rider:initializeIntellijPlatformPlugin' is not up-to-date because:
  Task is untracked because: Should always run
Resolve mutations for :rider:generateManifest (Thread[Execution worker Thread 4,5,main]) started.
:rider:generateManifest (Thread[Execution worker Thread 4,5,main]) started.

I tried this, with no success:

tasks {
    named("initializeIntellijPlatformPlugin") {
        outputs.cacheIf { true }
        inputs.dir(file(riderHome))
        outputs.dir("${layout.buildDirectory}/idea-sandbox")
    }
}

Looking at the implementation of the task on your side, I see that this task is marked as @UntrackedTask(because = "Should always run").

I’m not sure what to do next, I’d appreciate any help or guidance :folded_hands:

Thanks!

Hey, @nicolas.quinquenel!
The initializeIntellijPlatformPlugin task isn’t a problem here, but the IntelliJ Platform dependency preparation. This task takes longer only because it is the first to start resolving dependencies that involve the Plugin Verifier structure library for parsing and preparing the environment.
This week, I’m about to publish a new 2.6.0 version with updated PV dependency, which contains several performance improvements. Let’s hope for the best!

2 Likes

Thanks for the update Jakub, I will keep an eye on this release!

I did update to the latest 2.6.0 version, and unfortunately, I see little to no improvements. The behavior is still similar to what I described :pensive_face:

Edit: It’s effectively this kind of task that is taking a huge time:

Resolve dependencies of :clion-common:intellijPlatformDependency > Resolve files of configuration ‘:clion-common:intellijPlatformDependency’

1 Like