ANR in sentry when making a network call with retr...
# squarelibraries
c
ANR in sentry when making a network call with retrofit when using suspend functions. Very interesting... I guess serialization with moshi ends up being done on the main thread and that has an issue? Or am I interpreting this wrong?
j
It's creating the adapter, not doing serialization
Consider using Moshi codegen so you don't have to do kotlin-reflect
or using kotlinx.serialization
c
Interesting. And creating the adapter is creating the ANR? Weird. I wonder what the heck I did to get in this mess.
j
Yes. kotlin-reflect has to parse a protocol buffer that's compressed with a format called 7in8 (or something) and stored in a string inside an annotation on each class. It is quite slow.
today i learned 2