You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
static storage = new MMKV(); async cacheStream( sid: string, ops: any[], ) { const key = stream-${sid}; console.log('set', key); let storedData = DataStorage.storage.getString(key); let data = storedData ? JSON.parse(storedData) : []; data = [...data, ...ops]; DataStorage.storage.set(key, JSON.stringify(data)); return true; }
the length of ops can be huge. The storage works great in the case of 400K ops (the second largest I tested). But the largest ops array that I need to cache is larger than 5 million ops and in that case, I receive this error.
Is there a hard limit to how much data can be stored?
The error was thrown while testing on a real device (iPhone 15pro in my case) on simulators it works as intended.
Even if the issue cannot be fixed I am extremely grateful for your RN efforts and especially MMKV. (I really need MMKV for the system I am working with because the latency optimizations are extremely critical for the project)
Following part of the code throws this error
int8_t CodedInputData::readRawByte() {
if (m_position == m_size) {
auto msg = "reach end, m_position: " + to_string(m_position) + ", m_size: " + to_string(m_size);
throw out_of_range(msg);
}
auto *bytes = (int8_t *) m_ptr;
return bytes[m_position++];
}
The text was updated successfully, but these errors were encountered: