-
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
More I/O optimizations #14826
More I/O optimizations #14826
Conversation
…ecursive directory size
@@ -115,6 +115,9 @@ class DirectoryFileSystem : public IFileSystem { | |||
FileSystemFlags Flags() override { return flags; } | |||
u64 FreeSpace(const std::string &path) override; | |||
|
|||
// TODO: Replace with optimized implementation. |
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.
nit: Outdated comment.
-[Unknown]
Common/File/AndroidStorage.cpp
Outdated
int64_t size = env->CallLongMethod(g_nativeActivity, computeRecursiveDirectorySize, param); | ||
double elapsed = time_now_d() - start; | ||
|
||
ERROR_LOG(IO, "ComputeRecursiveDirectorySize(%s) in %0.3f s", uri.c_str(), elapsed); |
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.
nit: WARN or INFO?
-[Unknown]
Core/HLE/sceIo.cpp
Outdated
double listTime = time_now_d() - startTime; | ||
|
||
if (listTime > 0.01) { | ||
ERROR_LOG(IO, "Dir listing '%s' took %0.3f", path, listTime); |
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.
nit: WARN/INFO?
-[Unknown]
Tekken 6 , MH 3rd HD and others games loading become slow about 10 seconds on T6 and 5 seconds on MH but in the previous build those game load fast about 1-3 seconds only. |
Can you clarify "previous builds"? The one right before this was merged? |
Reinstalling ppsspp solve the loading slow issue 😅 |
Ok, that's weird. Anyway, I'm going to stress test a little bit, put lots of savedata on my S21 (which runs Android 11) and see if there are still bad issues to fix.. It does seem like scoped storage is noticeably slower on Android 11 than Android 12 by the way, so I'm testing on Android 11 now. |
Adds a Java-native function that computes the recursive size of a directory, and adds the plumbing to use it. I think there are still some possible optimizations there by avoiding some DocumentId lookups.
Adds back the sceIoDOpen logging which is useful while we work on this, might remove it again later.
Adds a hack that prevents directories like PSP/GAME from also showing up at the root if we strip /PSP from the path due to the user having chosen a directory called PSP as the root. This can probably be handled more elegantly elsewhere but don't really want to go digging into that right now.
Should help #13847 .