Hi, is serializationx faster than moshi with codegen -- in compile times?
g
gildor
08/17/2020, 5:01 AM
I don’t think that anyone will give you correct answer without actually measuring it on your project
gildor
08/17/2020, 5:01 AM
In theory compiler plugin should be faster (no additional code to compile, no stubs generation) and probably has better incremental support (at least in may have in future)
gildor
08/17/2020, 5:05 AM
it will be probably faster on practice if it’s the only AP which you use, so if you migrate on compiler plugin and don’t use kapt, so you don’t have stub generation step, it may be faster (see for example claims from KSP about replacing kapt - https://github.com/android/kotlin/tree/ksp/libraries/tools/kotlin-symbol-processing-api#comparison-to-kapt but also keep in mind that KSP generates Kotlin source code, not byte code, so it probably slower than pure compiler plugin)
But if you still have other APs it maybe much closer to moshi compile time (which also supports incremental AP, and It maybe not slower, maybe even faster)
gildor
08/17/2020, 5:06 AM
anyway, I wouldn’t believe any claims about performance (including my words above), without actual measuring of different scenarios (clean build, incremental with ABI change, incremental without ABI change) on your project
p
Paul Woitaschek
08/17/2020, 5:04 PM
Nothing beats moshi with reflection in debug builds ^^
g
gildor
08/18/2020, 1:27 AM
It’s true
u
ursus
08/18/2020, 1:51 AM
hmm, dagger and moshi are my only kapt things, and I heard of dagger-reflect -- I might look into that