-
-
Notifications
You must be signed in to change notification settings - Fork 277
Android Multiprocess Support? #445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I think multi-process mode is slower because it has to perform more disk-memory synchronisation (it always assumes that data might've changed in the meantime), which single-process mode doesn't have to do. |
That makes sense. With this PR #402, multiprocess is turned on on ios when |
Hey! Yeah I think this should be configurable from both iOS and Android, but not sure how since this is called once the JS bundle loads.... |
I added android support in #611. On iOS, AppGroups enable this mode. Looking at the MMKV doc, MultiProcess mode on iOS only makes sense with AppGroups and needs to be initialized when the bundle js loads On Android, this is not the case, MultiProcess mode is enabled when creating the instance so we can just add it as a config parameter. |
Hey - I think this has been fixed in V3 beta. |
Hi there,
I've encounter some segfaults today from accessing the storage via both the app and the widget on android.
After a little bit of digging it seems like the mmkv instance for android is hard coded to use single process mode here:
https://github.com/mrousavy/react-native-mmkv/blob/master/android/src/main/cpp/MmkvHostObject.cpp#L19
Is this intentional? For my use case, after changing this flag to MMKV_MULTI_PROCESS the app no longer crashes, although I haven't read enough of the code base to understand the full implication of this change.
The text was updated successfully, but these errors were encountered: