-
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
Reduce IO primarily during save operations #16190
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very very nice, thanks!
// TODO: Why do we add this padding? Crash avoidance? | ||
fileData.resize(fileData.size() + 0x01000000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks dubious and a bit excessive indeed. Would prefer to remove...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it's 16 MB. Been there for a long time it seems. I guess I can just remove, I'd kinda rather do that separately in case something I did here breaks save data or causes crashes.
-[Unknown]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed.
Let's always use ReadEntireFile() when we can.
These can take time so let's try to bundle them.
We often won't need this, so skip the call until needed.
Improves startup for games that load sceFont on devices with slow storage.
Sometimes, you need to tell the difference between an empty directory and one that doesn't exist at all. We can do this in a single call.
We can skip if there's no UI.
This only caches between touching PSP code, in case something changes. Reduces cases of multiple SFO lookups and reads.
ab8e704
to
db5011d
Compare
This reduces cases of GetFileListing or OpenFile combined with GetFileInfo, reduces duplicate file open/close cycles, and avoids some loads that weren't necessary.
This is just intended to improve the performance penalty of scoped storage on Android when dealing with save data.
-[Unknown]