micronaut-core: KAPT: kaptKotlin Performance regression in Micronaut Core 4.2.0

Actual Behaviour

kaptKotlin gradle building step with Micronaut Platform 4.2.0 takes 5x the time that it takes with Platform 4.1.6 on the same source code.

CPU Sampling profile of kaptKotlin task for Micronaut 4.1.6: micronaut-4.1.nps.zip

CPU Sampling profile of kaptKotlin task for Micronaut 4.2.0 on the same sources: micronaut-4.2.nps.zip

Potential culprit: Screenshot 2023-11-21 at 5 00 37 PM

Change in hot methods:

Screenshot 2023-11-21 at 5 38 46 PM Screenshot 2023-11-21 at 5 39 21 PM

Version

Micronaut Platform 4.1.6 -> 4.2.0

About this issue

  • Original URL
  • State: closed
  • Created 7 months ago
  • Comments: 18 (18 by maintainers)

Most upvoted comments

Ok, it should be faster, too. I am closing this one.

doesn’t look like you have updated the dependency graph correctly

+--- io.micronaut:micronaut-inject-java:4.2.1
|    +--- org.slf4j:slf4j-api:2.0.9
|    \--- io.micronaut:micronaut-core-processor:4.2.1

Is still referenced, these need to refer to the 4.3 snapshot

Make sure you use:

configurations.all {
  resolutionStrategy.eachDependency { details ->
    if (details.requested.group == 'io.micronaut') {
      details.useVersion "4.3.0-SNAPSHOT"
    }
  }
}