Hello! A beginner question: Does koin 3 annotation...
# android
j
Hello! A beginner question: Does koin 3 annotations impact build time?
a
You can ask in #koin
j
It has to do codegen so yes
☝️ 1
a
it uses ksp, as long as caching and incremental ksp are properly hooked up in the module, build times should be minimally impacted. KSP is seen to be twice as fast as KAPT
g
It’s really nice, but I wouldn’t say that “build times should be minimally impacted” == “KSP is seen to be twice as fast as KAPT” Even twice as fast, is still can be significant time
1
a
minimally compared to KAPT, I meant. not overall 😅
g
with only 2 times difference, actual implementation of code generator also important You cannot compare arbitrary code generators one with Kapt, one with KSP, because they actually do some work and performance depends on many factors, also build time increase is not not always linear with increase of amount of code/usages, it can be logarithimic or quadratic or worse KSP is beneficial in terms of build speed for existing processors, because you do not get additional stabs generation step, but it doesn’t mean that you can assume performance of code generator only by the fact that it uses KSP disclaimer: I know nothing about actual performance of Koin code generation and effect on build time, my comment is purely theoretical. P.S. do not believe any performance claims without proper benchmark (and in many cases it’s very hard or impossible to have one) or until you measure it yourself on your own project with your use cases
j
Currently there is no codegen with kapt, so the comparison is doing nothing vs generating things, so it impacts the build time.