https://kotlinlang.org logo
#decompose
Title
# decompose
a

Arkadii Ivanov

09/24/2023, 10:43 AM
Decompose v2.2.0-alpha01 is released! - Added support for
kotlinx-serialization
, deprecated Parcelable APIs Release notes: https://github.com/arkivanov/Decompose/releases/tag/2.2.0-alpha01
decompose intensifies 7
👍 1
t

Thomas Hormes

09/25/2023, 10:56 AM
Hey Arkadii, in Essenty Issue 102 you mentioned the need for an efficient binary format. However it seems that in this Release of Decompose/Essenty you used Json as the serialization format(?) Wouldn't CBOR quite accurately fit the needs of Decompose/Essenty for this use case?
a

Arkadii Ivanov

09/25/2023, 11:01 AM
Hey! Indeed! However, there were some issues. 1. Implementing the efficient binary format requires using experimental APIs a lot. This is not good for a transitively used library. 2. iOS may keep the saved state when the app is updated (if I understand it correctly). Same behaviour may be with platforms like Desktop. Using keyed formats like JSON is safer. 3. I did some benchmarks, and JSON+Zip gives much lower Bundle sizes on Android than Parcelize, and the speed is also better.
Currently, only JSON is stable.
I think once CBOR is stable, we could do benchmarks and probably switch to it. Binary compatibility for Essenty is the only concern here.
t

Thomas Hormes

09/25/2023, 11:12 AM
Alright, thank you for the detailed explanation 🙂
👍 1
6 Views