setTimeout around engine.save #142
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MichaelContento/redux-storage#142
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
We are currently using redux-storage and are experiencing that it slows down our app quite significantly due to many writes (debouncing didn't help in our case). As a small experiment we put a setTimeout(.., 1000) around the engine.save() command because we only want to save stuff as soon as there is no UI thread doing anything. And lo and behold, that surely sped things up quite a bit.
Would it be possible to have this as a feature and if not, are there complications?
Cheers,
Danny
But shouldn't redux-storage-decorator-debounce be the right solution for you?
Should have the same effect as your experiment, as
debouncealso usessetTimeout!?/me scratches his head... and tries again
😂
Doh.. we had a too-low debounce timeout value. Ignore this :)
Ehm... is it possible to do a write on onBeforeUnload if it happens before the debounce timeout?
You mean
window.onBeforeUnload? Please file a bug with this at redux-storage-decorator-debounce