Data: Persistence: Run persistence subscriber on idle callback#16657
Data: Persistence: Run persistence subscriber on idle callback#16657
Conversation
322b6bf to
f1a3156
Compare
|
I refreshed this and updated unit tests using a pattern for mocking However, I'm going to close this out for the following reasons:
|
|
@ellatrix I know you've been thinking about performance quite a bit lately, so while I don't know that there's anything else to be done around this, I wanted to get it on your radar in case it might strike any inspiration or if you have any thoughts. |
|
Thanks for sharing! I've not really looked at this side of performance so much yet. I do know that @youknowriad recently had the idea to allow batching dispatching actions, which would allow us to batch |
I actually tried this, it was super easy to implement. I didn't notice a big difference in performance (probably due to all the recent refactors), so I though it was not worth it for now. |
This pull request seeks to optimize the implementation of the data persistence plugin to occur asynchronously in response to a state change only at the earliest idle opportunity. Persistence should occur after a state change, but does not need to occur immediately / synchronously. By deferring the work, we lessen the total workload necessary for each state change.
Work in Progress:
Testing Instructions:
Ensure unit tests pass:
Verify that changes in preferences (e.g. top toolbar option) persist across page reloads.