Does anyone know of a good lightweight reactive li...
# android
e
Does anyone know of a good lightweight reactive library? RxJava is simply to bulky imo.
m
Android has its own reactivity — Broadcasts and BroadcastReceivers. Also, as my collegue suggests: https://github.com/google/agera
z
I don't see a reason why one would choose Agera over RxJava2.
e
The reasons would be that it’s more lightweight, but I don’t know of anyone who has tried it out. @miha-x64 have you tried it out?
m
what do you mean by lightweight actually
m
@enighma no, I haven’t.
e
@masc3d small footprint in terms of size (kb and method count)
m
@enighma having proguard this is a debug build concern only, right
e
@masc3d Using, proguard was one of the solutions. But it’s hard to tell how much of the 600+ kb I can get rid of in a normal project.
m
@enighma hm. with
rxjava
becoming the defacto reactive standard for java and more and more building on it (
rxbinding
,
rxlifecycle
etc.) this would probably not be reason enough for me to switch.
e
Yes, but if you’re building an Android app and want use instant apps and have a limit of 4MB (I think that was the limit) you have to be careful about which libraries you pull in. Especially if they have a large footprint.
m
@enighma especially considering those size/method count constraints will become less and less relevant
e
@masc3d not for instant apps though
m
so ~1000 methods and ~220kb including rxkotlin is too bulky
without obfuscation that is even
obfuscation will take off another ~20%, so you’re left with like 180kb
e
@masc3d isn’t the RxJava jar over 600kb?
m
@enighma even larger yes, but proguard brings it down to that size
e
Yeah, that I understand, but how much depends on how many of the operators you use and I’m curious how many I would use is a standard project.
m
that’s true, I took this from a project of mine, so this would probably be a realistic value
a project which uses
rxjava
for REST calls, events and bindings
rxjava-2.x
to be precise. I would expect 2.x to be considerably smaller in size after minimizing as it separates backpressure support into `Flowable`s, which are usually not required for android