Repository navigation
Reduce IO primarily during save operations - #16190
Merged
Merged
Conversation
hrydgard
approved these changes
Oct 9, 2022
Comment on lines
+1804
to
+1805
| // TODO: Why do we add this padding? Crash avoidance? | ||
| fileData.resize(fileData.size() + 0x01000000); |
Owner
There was a problem hiding this comment.
This looks dubious and a bit excessive indeed. Would prefer to remove...
Collaborator
Author
There was a problem hiding this comment.
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]
hrydgard
enabled auto-merge
October 9, 2022 21:08
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.
unknownbrackets
force-pushed
the
save-slow
branch
from
October 9, 2022 21:43
ab8e704 to
db5011d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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]