-
Notifications
You must be signed in to change notification settings - Fork 88
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
Significant Build Time Increase with Anvil 2.5.1 #1109
Comments
Omg hey Tristan! 😁 Thanks for including all the details. A couple questions:
|
it was already enabled yes, I just tested to see what happens with it set
sorry I should have been more specific with that detail. |
I just tried downgrading the kotlin plugin to
|
Okay interesting, so the confusing thing is that effectively the only changes included in the 2.5.1 release were defaulting
One additional question after rereading ^, does this include compilation of modules that do not use Anvil / apply the Anvil plugin? |
Good thinking to check that... looks like no obvious effect on Sorry I don't know what else to point to 🤔 Thanks for the help investigating so far! |
on a side note - I've only read through the roadmap this week. Anvil 3.0 sounds exciting! Though we are now debating whether to stick it out or look to adopt zac sweers fork simply to unlock k2. Any idea of timeline for k2 support? I think that's our bigger concern over whether we want to invest in dagger-ksp or anvil EDIT: sorry just read this other issue answer 😅 |
Thanks for checking! And no worries, I'm also a bit stumped with what could be causing the issue. If you do end up finding the time to make a reproducer that would be perfect, but also no pressure. It's a lot harder with perf-related issues compared to having a failure scenario.
Makes sense! Depending on how many custom code generators you have, migrating to and testing out Zac's fork might not be too big of a lift. I'd be interested to hear how perf numbers end up comparing for you since we weren't able to compare with K2 enabled at the time that we evaluated it internally. |
We have identified a significant increase in build times when upgrading from Anvil
2.5.0
to2.5.1
. Our daily Gradle profiler benchmark run using an abi change scenario running our:app:assembleDebug
task shows a 20% increase in build times.Details:
Project Type: Android app
Kotlin Version: 1.9
Java Version: 17
Anvil Extension Settings:
trackSourceFiles
: Enabled/Disabled (no effect)generateDaggerFactories
: trueScenario:
We apply an ABI change to a base module class that affects multiple downstream modules (e.g.,
architecture
->feature-core
->feature
).The build is run in an isolated way with all dependencies downloaded, offline mode, no build cache, and no configuration cache.
We run several warm-ups and 10 builds.
Results:
Additional Observations:
Investigating build scans, all
KotlinCompile
tasks seem to be marginally slower with Anvil2.5.1
.With all caching enabled, the same scenario on my local machine resulted in:
We would appreciate any insights or guidance on why this performance regression might be occurring and any potential solutions or workarounds. Hopefully I provided useful information - just wanted to be clear that this benchmark is for a large app (HubSpot) with a non-trivial dependency tree. Thank you for your assistance.
p.s. Hey @JoelWilcox ! its me Tristan 😄
The text was updated successfully, but these errors were encountered: