redux-persist-transform-encrypt icon indicating copy to clipboard operation
redux-persist-transform-encrypt copied to clipboard

It caused the very obvious lagging if the reducer store is large

Open xingsuo opened this issue 7 years ago • 4 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 avatar Nov 14 '18 02:11 xingsuo

@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 avatar Nov 14 '18 18:11 maxdeviant

@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.

xingsuo avatar Nov 14 '18 18:11 xingsuo

When do you notice the lagging? Just on app start (dehydrate) or when every redux reducer runs?

JeremyBradshaw7 avatar Jul 15 '20 13:07 JeremyBradshaw7

I don't think we have any recourse here until #48 is resolved.

maxdeviant avatar Oct 17 '20 15:10 maxdeviant

Closing this issue since there isn't anything that can be done in the current state of things.

maxdeviant avatar Mar 25 '23 14:03 maxdeviant