It caused the very obvious lagging if the reducer store is large
xingsuo opened this issue · 5 comments
I am working on the performance issue for two weeks but end up found that this encryption is quite time consuming and will block the UI if the data is very large
@xingsuo Yea, unfortunately encryption/decryption can be quite slow.
Ideally you would need to do the encryption/decryption asynchronously in order to not block the UI thread, but right now async support isn't working.
Part of the problem is that (at least when it was implemented), redux-persist
didn't support a Promise-based API to allow for asynchronous encryption/decryption. I have not looked to see if that situation has changed at all.
@maxdeviant Thanks for the quick response and explanation. I am wondering if there is a way to control the timing of the encryption/decryption? Because I am thinking if it's possible I can just put it while the UI is free, such as onLoading or onClose of the app.
When do you notice the lagging? Just on app start (dehydrate) or when every redux reducer runs?
I don't think we have any recourse here until #48 is resolved.
Closing this issue since there isn't anything that can be done in the current state of things.