-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Execute savedata operations on a thread, notify of failure #6468
Conversation
Some savedata is sorta large, like 1MB, this makes it save more smoothly.
@unknownbrackets I can confirm that #3039 is completely resolved after applying this pull request. EDIT:- Interestingly enough I thought it wasn't resolved with this branch until I realised I was using a modified build with d8cff45 reverted (in order to deal with the timing issues in Miku Extend (#6441 (comment))). So apparently d8cff45 is part of the puzzle with the torn sound in this game and is required for the resolution of the issue too. EDIT2:- And in Brave Story too. |
Well, this only affects savedata. That commit makes a bunch of background threads not hog the cpu in several games, savedata or not. -[Unknown] |
Execute savedata operations on a thread, notify of failure
@solarmystic I wouldn't say "completely resolved" because I have noticed some stutter sometimes when I have tested... Here is the stack trace :
|
I think this will fix that: e505655 If your disk is asleep, it will take time. Also, if the operation takes > 30 ms it may blip but it should not be too bad. That's a long time for an IO operation on a modern device. -[Unknown] |
From my testing, the crash is fixed, thanks :) I have also noticed that the stutters are only here when PPSSPP window is fullscreen on my secondary monitor (yes, that secondary monitor strangeness like in #6462)... |
@vnctdj Thanks for the feedback. I was being honest when I said that the stutters are completely fixed because I cannot reproduce them anymore on my system. |
This may help #3039. It runs a separate thread to actually load/save data on, in all cases. The only observable change in behavior should be that each auto savedata operation now takes an extra Update() call (which I'm pretty sure everything is supposed to take several.)
Also, it's possible to end up with a perfectly writable savedata directory, but a file inside that is read-only or owned by another user. It's also possible to run out of disk and such. I think we check for some of these situations at least, but before, we silently failed. This now shows a message if saving/loading fails for any reason. Could probably be improved (why did it fail? testing that things do correctly fail, etc.)
-[Unknown]