We are having a difficult time with the app we are building to have offline capabilities.
The RAM usage is really high when the data is fetched and passed to the reducers (especially when it contains large JSON data), which crashes the app.
If we remove the redux-persist package, the RAM is fine but we need offline capabilities in our app that have large data transfer from API calls to mobile.
Anyone have any idea on what to do or how to flush the RAM out after each call?
"redux-persist": "5.10.0"
Thanks.
const persistConfig = {
key: "root",
storage: isApple() ? storage : FilesystemStorage,
stateReconciler: autoMergeLevel2,
};
const enhancer = compose(
applyMiddleware(thunk),
);
const pReducer = persistReducer(persistConfig, reducer);
export const store = createStore(pReducer, enhancer);
export const persistor = persistStore(store);
const projectsPersistConfig = {
key: "projects",
storage: isApple() ? storage : FilesystemStorage,
blacklist: ["selected", "isLoading", "selectedTile"]
};
const setupPersistConfig = {
key: "setup",
storage: isApple() ? storage : FilesystemStorage,
blacklist: ["connection", "isLoading", "authFailed"]
};
const defectsPersistConfig = {
key: "defects",
storage: isApple() ? storage : FilesystemStorage,
blacklist: ["syncError", "isLoading", "selected", "showToaster"]
};
const rootReducer = combineReducers({
defects: persistReducer(defectsPersistConfig, ReducerDefects),
setup: persistReducer(setupPersistConfig, ReducerSetup),
projects: persistReducer(projectsPersistConfig, ReducerProjects),
});
👍
Same issue here. I'm getting out of memory message due too large JSON. Any advice or solution?
Has then been addressed at all? I'm experiencing the same issue and wonder if someone has found a fix for it.
Hello guys, I'm with the same situation. Have you tried the sqlite adapter? It'll be my next try.
Hello all, I tried a lot of different methods and nothing seemed to work.
My final decision was to completely remove this library and move everything
to SQLite. It works so beautifully after the change and I would
highly recommend everyone doing this before moving too far down the hole.
On Wed, Dec 23, 2020 at 8:14 AM William Gurzoni notifications@github.com
wrote:
Hello guys, I'm with the same situation. Have you tried the sqlite
adapter? It'll be my next try.—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/rt2zz/redux-persist/issues/1057#issuecomment-749725737,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AHOEPWTXQFBSYJ3HHZEOSY3SWDVX3ANCNFSM4ICANWVQ
.
Hello @varshilu could you please give more details about your new structure? Are you using the sqlite adapter or removed for complete the redux-persist? Thank you.
Most helpful comment
Has then been addressed at all? I'm experiencing the same issue and wonder if someone has found a fix for it.