You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, if you dig into kotlinx.coroutines issues about ServiceLoader, you will see it's unfortunately very expensive on Android. Probably best to stick to build-time only behavior, or implement a custom, cheaper and R8 safe way to do what ServiceLoader does.
The text was updated successfully, but these errors were encountered:
Hey! yeah, that's unfortunate and would be nice to have. As far as I understand, R8 can transform specific calls in a form of: ServiceLoader.load(X.class, X.class.getClassLoader()).iterator() (source)
So probably it's doable. Would be nice to hear on how to better test it.
FYI, I was able to test and fix the performance of ServiceLoader on Android (for most cases I believe?)
I don't have real device at my side, but I do believe that there should be no difference
Hi, if you dig into kotlinx.coroutines issues about ServiceLoader, you will see it's unfortunately very expensive on Android. Probably best to stick to build-time only behavior, or implement a custom, cheaper and R8 safe way to do what ServiceLoader does.
The text was updated successfully, but these errors were encountered: