How serialization actually works? Is it a compiler plugin? Is it faster than kapt? Will it be faster than KSP in future?
j
jw
09/14/2020, 1:26 PM
It's a compiler plugin that generates visitor-like code for visiting the properties of a class. Comparing it to kapt and KSP doesn't make sense since you could not implement serialization as an annotation processor or symbol processor since it modifies classes.
j
Jan Skrasek
09/14/2020, 1:40 PM
I mean is there a performance gain when switching from kapt generated adapter for Json processing, like the one in Moshi?
j
jw
09/14/2020, 1:41 PM
Performance at compile-time or runtime?
j
Jan Skrasek
09/14/2020, 1:42 PM
Compile-time
j
jw
09/14/2020, 3:10 PM
The compiler plugin is faster, although I'm not sure build speed is a primary concern in general since you only compile once but run many times.