Description
We have identified a significant increase in build times when upgrading from Anvil 2.5.0
to 2.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
: true
Scenario:
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:
Anvil 2.5.0: Average build time: 26 seconds
Anvil 2.5.1: Average build time: 32 seconds
Additional Observations:
Investigating build scans, all KotlinCompile
tasks seem to be marginally slower with Anvil 2.5.1
.
With all caching enabled, the same scenario on my local machine resulted in:
Anvil 2.5.0: 18 seconds
Anvil 2.5.1: 27 seconds
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 😄