Primitive task system to avoid locking UI during long-running operations #177
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello! I didnt see any documentation about contributing, so sorry in advance if this isnt correct. Anyway, let me tell you about this PR.
Ive been using this tool a lot lately, and on larger SAV files, many operations completely lock up the UI, sometimes for up to 30 seconds, and windows starts to complain very quickly that the program is not responding. And having the UI completely locked up is a pretty bad experience in general.
So the goal of this PR is to take certain long running operations and move them off the main UI thread. I demonstrate a primitive task system that does a few things:
Here's a quick video of what it looks like to use this program with these changes:
ySBAuBV.mp4
This is very much a proof of concept, but I wanted to get some early feedback on the approach before I kept working on it. I only implemented Loading and Saving menu operations right now, but in theory any long running task could be migrated to this system.
I think it could be merged in its current form, but there are a few changes I'd make to improve it:
Let me know what you think!