Paper icon indicating copy to clipboard operation
Paper copied to clipboard

async StoredUserList saving

Open wuangg opened this issue 1 year ago • 5 comments

Offload JSON serializing and file writing to another thread so as not to put a strain on the main thread performance when interacting with user lists that contain a lot of list entries.

wuangg avatar Feb 07 '24 22:02 wuangg

based

ghost avatar Feb 08 '24 14:02 ghost

I have acknowledged about using a single thread executor for this right after I created this PR. I will do the required changes once I have free time.

wuangg avatar Feb 09 '24 19:02 wuangg

Each StoredUserList now has a single thread executor on their own, these executors will be shut down once the server is stopped.

wuangg avatar Feb 09 '24 20:02 wuangg

I would just use a shared executor between all of them, no need for them to each have their own

electronicboy avatar Feb 09 '24 20:02 electronicboy

Yes, I should have gone with that solution as I wasn't thoughtful enough earlier. Thanks for the heads up.

wuangg avatar Feb 09 '24 21:02 wuangg