-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KAPT: kaptKotlin Performance regression in Micronaut Core 4.2.0 #10145
Comments
@dstepanov I tried SNAPSHOT core with #10195 and while it may decrease the duration of |
I think it was caused by e1a990b Do you have a lot of interfaces with annotations? Can you benchmark using the async profiler? https://github.com/async-profiler/async-profiler: You can attach it to the Gradle worker remotely. |
@dstepanov I can't say so. We have some, but it's in low double digits. Nothing to justify a 30 seconds -> 2.5 minutes jump. Mostly it's controllers with data classes. |
Thanks, if you are willing, I might try to come up with a few branches for you to build locally and check if it does improve anything. |
@dstepanov Yes! I can build snapshots locally, give them a shot, and see if any of them bring the timings back. Whatever it takes. Currently, we are pretty much blocked from 4.2.x for developer productivity reasons. |
Profiles of kaptKotlin tasks taken with JetBrains-integrated async-profiler for 4.1.6 and 4.2.1 with micronaut-core:4.2.2-SNAPSHOT: |
@dstepanov Unfortunately, #10237 seems to not help our project much. kaptKotlin with Micronaut 4.1.6 is 30 seconds Let me know if you want an async-profiler recording updated for this PR. |
Hmm, is it better than before? |
Please try to profile |
Make sure you use: configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'io.micronaut') {
details.useVersion "4.3.0-SNAPSHOT"
}
}
} |
micronaut-core 4.3.0-20231211.112139-26 and 4.3.0-20231208.160954-24 give me the same time +- 2 sec.
|
Don't look like it's applied:
Precessors need to change the version. Have you tried to force it like I posted? |
doesn't look like you have updated the dependency graph correctly
Is still referenced, these need to refer to the 4.3 snapshot |
Thanks, let me pin micronaut-core-processor version to SNAPSHOT and I will post an update |
That was it. kaptKotlin timing is great on the 4.3.0-SNAPSHOT. |
Perfect! |
Ok, it should be faster, too. I am closing this one. |
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:
Change in hot methods:
Version
Micronaut Platform 4.1.6 -> 4.2.0
The text was updated successfully, but these errors were encountered: