Well, rx2 dependencies overhead after proguard is about 2.5k in my project and coroutines is only ~0.5k (even with coroutines-rx2), but the initial question is still actual: why coroutines generates more methods and what to do with it?
g
gildor
06/01/2018, 6:00 AM
What to do with what? Do you see any really unnecessary methods that can be optimised? Really, your samples looks not very realistic
Also methods count is also about references to other methods, maybe it’s just first usage overhead.
And would be interesting to see some real sample to compare
t
thevery
06/01/2018, 9:14 AM
@gildor real project results are even worse. First usage overhead - no, I've duplicated blocks of code and counted difference.
thevery
06/01/2018, 9:15 AM
I've not checked generated code yet since kotlin->java decomplier doesn't work for me on coroutines.
g
gildor
06/01/2018, 9:18 AM
you cannot use decompiler for coroutines, check bytecode
e
elizarov
06/04/2018, 12:43 PM
Some of the generated methods for coroutines are indeed not strictly necessary. They will be optimized in the finalized version of coroutines that is planned for Kotlin 1.3.