-
Notifications
You must be signed in to change notification settings - Fork 1
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
[Backup] Experimentation of react-native-mmkv to store local backup config #1097
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Merged
Ldoppea
added a commit
that referenced
this pull request
Dec 19, 2024
Since we migrated the project to RN73 we can now use MMKV instead of AsyncStorage This migration is done in order to improve performances. MMKV being faster by multiple order of magnitude than AsyncStorage Code taken from #1097 Co-authored-by: Théo Poizat <[email protected]>
Ldoppea
added a commit
that referenced
this pull request
Dec 19, 2024
Since we migrated to MMKV, existing users' data should be migrated from the old AsyncStorage to MMKV Code taken from #1097 Co-authored-by: Théo Poizat <[email protected]>
Closing because #1265 |
Ldoppea
added a commit
that referenced
this pull request
Dec 20, 2024
Since we migrated the project to RN73 we can now use MMKV instead of AsyncStorage This migration is done in order to improve performances. MMKV being faster by multiple order of magnitude than AsyncStorage Code taken from #1097 Co-authored-by: Théo Poizat <[email protected]>
Ldoppea
added a commit
that referenced
this pull request
Dec 20, 2024
Since we migrated to MMKV, existing users' data should be migrated from the old AsyncStorage to MMKV Code taken from #1097 Co-authored-by: Théo Poizat <[email protected]>
Ldoppea
added a commit
that referenced
this pull request
Dec 20, 2024
Since we migrated the project to RN73 we can now use MMKV instead of AsyncStorage This migration is done in order to improve performances. MMKV being faster by multiple order of magnitude than AsyncStorage Code taken from #1097 Co-authored-by: Théo Poizat <[email protected]>
Ldoppea
added a commit
that referenced
this pull request
Dec 20, 2024
Since we migrated to MMKV, existing users' data should be migrated from the old AsyncStorage to MMKV Code taken from #1097 Co-authored-by: Théo Poizat <[email protected]>
Ldoppea
added a commit
that referenced
this pull request
Dec 20, 2024
Since we migrated the project to RN73 we can now use MMKV instead of AsyncStorage This migration is done in order to improve performances. MMKV being faster by multiple order of magnitude than AsyncStorage Code taken from #1097 Co-authored-by: Théo Poizat <[email protected]>
Ldoppea
added a commit
that referenced
this pull request
Dec 20, 2024
Since we migrated to MMKV, existing users' data should be migrated from the old AsyncStorage to MMKV Code taken from #1097 Co-authored-by: Théo Poizat <[email protected]>
Ldoppea
added a commit
that referenced
this pull request
Dec 20, 2024
Since we migrated the project to RN73 we can now use MMKV instead of AsyncStorage This migration is done in order to improve performances. MMKV being faster by multiple order of magnitude than AsyncStorage Code taken from #1097 Co-authored-by: Théo Poizat <[email protected]>
Ldoppea
added a commit
that referenced
this pull request
Dec 20, 2024
Since we migrated to MMKV, existing users' data should be migrated from the old AsyncStorage to MMKV Code taken from #1097 Co-authored-by: Théo Poizat <[email protected]>
Ldoppea
added a commit
that referenced
this pull request
Dec 20, 2024
Since we migrated the project to RN73 we can now use MMKV instead of AsyncStorage This migration is done in order to improve performances. MMKV being faster by multiple order of magnitude than AsyncStorage Code taken from #1097 Co-authored-by: Théo Poizat <[email protected]>
Ldoppea
added a commit
that referenced
this pull request
Dec 20, 2024
Since we migrated to MMKV, existing users' data should be migrated from the old AsyncStorage to MMKV Code taken from #1097 Co-authored-by: Théo Poizat <[email protected]>
Ldoppea
added a commit
that referenced
this pull request
Dec 20, 2024
Since we migrated the project to RN73 we can now use MMKV instead of AsyncStorage This migration is done in order to improve performances. MMKV being faster by multiple order of magnitude than AsyncStorage Code taken from #1097 Co-authored-by: Théo Poizat <[email protected]>
Ldoppea
added a commit
that referenced
this pull request
Dec 20, 2024
Since we migrated to MMKV, existing users' data should be migrated from the old AsyncStorage to MMKV Code taken from #1097 Co-authored-by: Théo Poizat <[email protected]>
Ldoppea
added a commit
that referenced
this pull request
Dec 20, 2024
Since we migrated the project to RN73 we can now use MMKV instead of AsyncStorage This migration is done in order to improve performances. MMKV being faster by multiple order of magnitude than AsyncStorage Code taken from #1097 Co-authored-by: Théo Poizat <[email protected]>
Ldoppea
added a commit
that referenced
this pull request
Dec 20, 2024
Since we migrated to MMKV, existing users' data should be migrated from the old AsyncStorage to MMKV Code taken from #1097 Co-authored-by: Théo Poizat <[email protected]>
Ldoppea
added a commit
that referenced
this pull request
Dec 20, 2024
Since we migrated the project to RN73 we can now use MMKV instead of AsyncStorage This migration is done in order to improve performances. MMKV being faster by multiple order of magnitude than AsyncStorage Code taken from #1097 Co-authored-by: Théo Poizat <[email protected]>
Ldoppea
added a commit
that referenced
this pull request
Dec 20, 2024
Since we migrated to MMKV, existing users' data should be migrated from the old AsyncStorage to MMKV Code taken from #1097 Co-authored-by: Théo Poizat <[email protected]>
Ldoppea
added a commit
that referenced
this pull request
Jan 9, 2025
Since we migrated the project to RN73 we can now use MMKV instead of AsyncStorage This migration is done in order to improve performances. MMKV being faster by multiple order of magnitude than AsyncStorage Code taken from #1097 Co-authored-by: Théo Poizat <[email protected]>
Ldoppea
added a commit
that referenced
this pull request
Jan 9, 2025
Since we migrated to MMKV, existing users' data should be migrated from the old AsyncStorage to MMKV Code taken from #1097 Co-authored-by: Théo Poizat <[email protected]>
Ldoppea
added a commit
that referenced
this pull request
Jan 17, 2025
Since we migrated the project to RN73 we can now use MMKV instead of AsyncStorage This migration is done in order to improve performances. MMKV being faster by multiple order of magnitude than AsyncStorage Code taken from #1097 Co-authored-by: Théo Poizat <[email protected]>
Ldoppea
added a commit
that referenced
this pull request
Jan 17, 2025
Since we migrated to MMKV, existing users' data should be migrated from the old AsyncStorage to MMKV Code taken from #1097 Co-authored-by: Théo Poizat <[email protected]>
Ldoppea
added a commit
that referenced
this pull request
Jan 17, 2025
Since our previous upgrades we can now use MMKV instead of AsyncStorage This migration is done in order to improve performances. MMKV being faster by multiple order of magnitude than AsyncStorage Code taken from #1097 Co-authored-by: Théo Poizat <[email protected]>
Ldoppea
added a commit
that referenced
this pull request
Jan 17, 2025
Since we migrated to MMKV, existing users' data should be migrated from the old AsyncStorage to MMKV Code taken from #1097 Co-authored-by: Théo Poizat <[email protected]>
Ldoppea
added a commit
that referenced
this pull request
Jan 17, 2025
Since our previous upgrades we can now use MMKV instead of AsyncStorage This migration is done in order to improve performances. MMKV being faster by multiple order of magnitude than AsyncStorage Code taken from #1097 Co-authored-by: Théo Poizat <[email protected]>
Ldoppea
added a commit
that referenced
this pull request
Jan 17, 2025
Since we migrated to MMKV, existing users' data should be migrated from the old AsyncStorage to MMKV Code taken from #1097 Co-authored-by: Théo Poizat <[email protected]>
Ldoppea
added a commit
that referenced
this pull request
Feb 12, 2025
Since our previous upgrades we can now use MMKV instead of AsyncStorage This migration is done in order to improve performances. MMKV being faster by multiple order of magnitude than AsyncStorage Code taken from #1097 Co-authored-by: Théo Poizat <[email protected]>
Ldoppea
added a commit
that referenced
this pull request
Feb 12, 2025
Since we migrated to MMKV, existing users' data should be migrated from the old AsyncStorage to MMKV Code taken from #1097 Co-authored-by: Théo Poizat <[email protected]>
Ldoppea
added a commit
that referenced
this pull request
Feb 12, 2025
Since our previous upgrades we can now use MMKV instead of AsyncStorage This migration is done in order to improve performances. MMKV being faster by multiple order of magnitude than AsyncStorage Code taken from #1097 Co-authored-by: Théo Poizat <[email protected]>
Ldoppea
added a commit
that referenced
this pull request
Feb 12, 2025
Since we migrated to MMKV, existing users' data should be migrated from the old AsyncStorage to MMKV Code taken from #1097 Co-authored-by: Théo Poizat <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This branch is not meant to be merged. It is just an experimentation to understand the advantages, drawbacks and implications of react-native-mmkv.
Backup current implementation uses react-native-async-storage to store local backup config. I decided to store the FULL config (backup status, uploaded media list, media to upload list, ...) in ONE key as a stringified JSON object to avoid any state issue.
But this lead to multiples issues because the local backup config can take tens of MB when there are a lot of medias, so we have :
There are multiple solutions to these issues. Here I try react-native-mmkv instead of react-native-async-storage which is known to be very fast. It may be a quick win without changing the algorithm too much and benefiting the entire app.
In this branch, I only try react-native-mmkv with backup feature.
Performance result
We can see a 5x to 10x performance boost. UX is better. I do not understand the parsing differences and I do not know if they are relevant.
Other results
Tested