-
-
Notifications
You must be signed in to change notification settings - Fork 110
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
[Bug] Problem with redux-persist #286
Comments
Does this affect reading the data? Or no? |
No, this doesn't affect reading the data. Maybe the problem is how the set is implement into the MMKV library |
Its how mmkv is designed and why it is fast because it does not measure and increase file size on each entry but grows exponentially. So 128 to 256 to 512 to 1024 to 2048 and so on. If you need something accurate, it will be slower. So you have to choose what you want, speed or size. |
wait, if you do this MMKV.set('a', 1) the results should be
instead of:
How should be invalidated the cache? and how the versioning works? |
Can we get some more details about this? I am having the same issue, which makes this lib pretty much useless. I am using it with react-navigation state persistence, which stores the current navigation stack in mmkv for every screen change (so the user returns back to it after app restart). Within minutes my storage has grown to 50mb usage. |
In your opinion what's the best option if size is a concern? |
does someone have a sample repo to see this? |
Hey, @ramirobg94 |
Describe the bug
I'm facing a problem with redux-persist that can cause a memory and storage leak
Every time a new redux-persist version is created a new key:value pair is stored in the file system.
For example, I have a file with 143 versions, so the size should be 143 times smaller:
As you can see in the image I took the file from the container
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
All the values stored with the same key should be overwritten like map storage.
Platform Information:
"react-redux": "^8.0.2",
"redux": "^4.2.0",
"redux-persist": "^6.0.0",
The text was updated successfully, but these errors were encountered: