Skip to content
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

feat: Migrate storage from AsyncStorage to MMKV #1265

Draft
wants to merge 6 commits into
base: feat/add_performance_measurements
Choose a base branch
from

Conversation

Ldoppea
Copy link
Member

@Ldoppea Ldoppea commented 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

This PR replaces #1097

### ✨ Features

*

### 🐛 Bug Fixes

*

### 🔧 Tech

* Migrate storage management from AsyncStorage to MMKV

await migrateFromAsyncStorage()
setHasMigrated(true)
} catch (e) {
// TODO: fall back to AsyncStorage? Wipe storage clean and use MMKV? Crash app?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO ? But don't know what to do...

@zatteo
Copy link
Contributor

zatteo commented Dec 20, 2024

About the second commit message

Since we migrated the project to RN73 we can now use MMKV instead of
AsyncStorage

There are no links with RN73 no?

@Ldoppea Ldoppea force-pushed the feat/add_performance_measurements branch from 46a63ec to 9f81a02 Compare December 20, 2024 09:15
@Ldoppea Ldoppea force-pushed the feat/add_performance_measurements branch from 9f81a02 to e76e118 Compare December 20, 2024 14:30
@Ldoppea Ldoppea force-pushed the feat/mmkv branch 2 times, most recently from acd273d to 9215bc8 Compare December 20, 2024 16:43
@Ldoppea Ldoppea force-pushed the feat/add_performance_measurements branch from e76e118 to 9477980 Compare December 20, 2024 17:32
@Ldoppea Ldoppea force-pushed the feat/add_performance_measurements branch from 9477980 to 550084c Compare December 20, 2024 19:37
@Ldoppea Ldoppea force-pushed the feat/add_performance_measurements branch from 550084c to 4c6ccc2 Compare December 20, 2024 19:54
@Ldoppea Ldoppea force-pushed the feat/add_performance_measurements branch from 4c6ccc2 to fabbd4e Compare December 20, 2024 20:08
Ldoppea and others added 6 commits December 20, 2024 21:17
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 <hello@zatteo.com>
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 <hello@zatteo.com>
@Ldoppea Ldoppea force-pushed the feat/add_performance_measurements branch from fabbd4e to 8821f44 Compare December 20, 2024 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants