Skip to content
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

Merged
merged 7 commits into from
Sep 11, 2021
Merged

More I/O optimizations #14826

merged 7 commits into from
Sep 11, 2021

Conversation

hrydgard
Copy link
Owner

@hrydgard hrydgard commented Sep 11, 2021

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 .

@hrydgard hrydgard added the I/O Affected by I/O timing settings, or other kind of I/O issue. label Sep 11, 2021
@hrydgard hrydgard added this to the v1.12.0 milestone Sep 11, 2021
@@ -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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Outdated comment.

-[Unknown]

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);
Copy link
Collaborator

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]

double listTime = time_now_d() - startTime;

if (listTime > 0.01) {
ERROR_LOG(IO, "Dir listing '%s' took %0.3f", path, listTime);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: WARN/INFO?

-[Unknown]

@hrydgard hrydgard merged commit f535463 into master Sep 11, 2021
@hrydgard hrydgard deleted the more-io-optimizations branch September 11, 2021 16:54
@ghost
Copy link

ghost commented Sep 12, 2021

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.

@hrydgard
Copy link
Owner Author

Can you clarify "previous builds"? The one right before this was merged?

@ghost
Copy link

ghost commented Sep 12, 2021

Can you clarify "previous builds"? The one right before this was merged?

Reinstalling ppsspp solve the loading slow issue 😅

@hrydgard
Copy link
Owner Author

hrydgard commented Sep 12, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I/O Affected by I/O timing settings, or other kind of I/O issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants