Closed adityaputra11 closed 1 year ago
Hi @adityaputra11, thanks for submitting this issue.
Can mmkv and async storage exist side-by-side?
The sdk latency is dominated by network, and doesn't read or write from storage too often, or with any significant volume. I can look into updating to mmkv, but this includes changing our docs, making the installation instructions version dependent, which is not ideal.
One option would be to expose the storage interface and allow the app to configure the implementation.
Let me know what you think!
Hi @bgiori i think the option to expose the storage interface is quite interesting
actually yes mmkv and async storage exist side by side, in our app, actually we though changing storage will help a lot to reduce latency
We use an in memory object as a cache for reading variants from storage, so reads, which are by far the most frequent, should not access async storage at all. Write occur after a call to fetch()
, which makes a network request, and writes a single, albeit large, value to async storage. Since the network request is ~30ms at its fastest, the single write should add negligible latency.
That said, I understand that you may want to implement your own storage for performance or to reduce bundle/app size by consolidating storage libraries.
sure, thank you for insight :)
currently we use amplitude experiment amplitude for our project, but we have plan to move to react native mmkv because this storage is more faster than asyncstorage, can we request to use react native mmkv as experiment local storage?