MMKV icon indicating copy to clipboard operation
MMKV copied to clipboard

Maximal storage problems

Open henrikzabel opened this issue 4 years ago • 10 comments

Because I thought if WeChat uses MMKV to store messages for being able to use the app even if the user is offline I wanted to add this to my chat-app too. But I ran into an issue:

When writing massive Data (massive in ratio) like 300MB to the mmkv storage I have the problem that I cannot do this. It simply wont let me because this is too much data.

I searched for the maximum storage or so in the whole repository but I coulnd't find any limitations. Are there any? Would be nice if you let me know because otherwise I would have to look for an alternative for storing chat messages on the users device :)

henrikzabel avatar Jan 23 '22 12:01 henrikzabel

NO. WeChat doesn't use MMKV to store messages. Check our FAQ on the wiki page for the storage limit of MMKV.

lingol avatar Jan 23 '22 12:01 lingol

For storing large data such as chat history, we recommend WCDB, which is also open-sourced by the WeChat team.

lingol avatar Jan 23 '22 12:01 lingol

Is there any plan to make your libaries for react-native too?

henrikzabel avatar Jan 23 '22 13:01 henrikzabel

There's already more than one RN wrapper out there, and some of them are quite good. I don't see the point to provide yet another one.

lingol avatar Jan 23 '22 13:01 lingol

I am sorry, but I couldn't find any RN library for wcdb :/ Do you know any?

henrikzabel avatar Jan 23 '22 13:01 henrikzabel

I thought you mean RN library for MMKV. Anyway, as for WCDB, you could just use any RN wrapper of SQLite instead.

lingol avatar Jan 23 '22 13:01 lingol

Okay. Thank you very much ;) If my App is getting bigger I think I am going to switch to complete native code. Than I am going to use WCBD :) And I'll take a look on these rn mmkv libraries :)

henrikzabel avatar Jan 23 '22 13:01 henrikzabel

@lingol Do you know any good and (very) fast Sqlite wrapper for React Native? There are a tons but often they are slow or outdated or so :/

henrikzabel avatar Jan 23 '22 14:01 henrikzabel

I don't know that. And it's unrelative to this very repo.

lingol avatar Jan 23 '22 14:01 lingol

Thank you anyways :)

henrikzabel avatar Jan 23 '22 14:01 henrikzabel