-
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
Android 11 lag/perf problems - probably related to scoped storage #13847
Comments
Yes, I feel too that slow response. My phone is Galaxy S20. |
Here is the screen record about the lag. Sorry for the low quality. The game ran on the default settings of PPSSPP. |
Wow, really weird that it's lagging while you are choosing save slot! Does Vulkan/OpenGL make a difference? This might be rendering related.. |
I also thought of this and tried switch to OpenGL but it still lag. |
I tried to get a logcat. (Is this OK?) Tested on BLEACH SC1 Save Data Loading. |
I tried video recording on Windows10 & Android 11(Galaxy S20 5G). [Windows10-Non lagging.] [Android11-Petit Freeze.(Sound will stop.)] |
My case & case of @NeverSm1le seems different working. |
Everybody love it "Janne d'Arc".:grin: [Android11-Petit Freeze.] |
If you change IO timing method to "Host" does the lag go away? This isn't a fix and makes timing different depending on the system, which might make new bugs other people can't reproduce. But it would help confirm the cause. -[Unknown] |
It's not change to response of loading in my case. |
Android11 is very unpleasant by this issue. 😩 |
Really very odd this.. Maybe direct access to storage already is simulated by some horrible Java layer, and lots of very small freads are slow (if that's what's happening, no idea...) Think I'll have to investigate this |
I felt about this issue, Android system is perfect freezing by this issue. "Why I think so?" I don't know about this report has important or not. When I can help something, please say. 😁 |
On Snapdragon 860 and Android11 and im experiencing similar issues. On some games its more heavier and on others its smaller. |
@GamerzHell9137 Looks like you are using a high res texture pack - do you get the same if you turn off texture replacement? |
Happens on games that have no texture pack or anything. Project Diva Extend does the same when accessing the loading screen but in gameplay its fine. |
That makes sense, because if IO operations are taking a weirdly long amount of time, "force real clock sync" only gives 2ms of buffer to recover from that. So, if IO operations are somehow taking 4ms, with that enabled it will much more frequently impact overall speed. We would be writing to multiple files when creating or loading savedata, but I think they're mostly complete reads and writes? -[Unknown] |
I've added full scoped storage support now, and who knows, it might even perform faster if you move the PSP directory to somewhere using it, now that we've implemented the fast way to do directory read. Previously this probably behind the scenes went through a slow wrapper on Android 11.... I don't think there's much more we can do here :( Maybe there are some file operations that can be avoided by relying more on error returns, like for avoiding separately checking files for existence. But it'll be marginal. |
@hrydgard 20210807_110516.mp4 |
could try uninstalling and then reinstalling, which might allow you to use the new way. :) |
Oh... |
Maybe it's depends on the sdcard class? read/write speed 🤔 |
There are some really bad cases of this - games like Wipeout Pure and Pulse scan through all of PSP/GAME on startup, issuing a sceIoDopen on each directory recursively. If you have a lot of stuff there, this is now unbearably slow and there's no way to parallelize. Considering simply hiding directories the game shouldn't care about from itself... I guess it's looking for level packs or updates? |
Stops some games from spending lots of time iterating over files they should not care about. Helps the performance issues in #13847 quite a bit.
Argh, I think I finally realized why some get such heavy slowdowns in save dialog. It's our virtual free disk space simulation in |
OK, I got some optimizations in through #14824, which should help the issue @Saramagrean had there, plus some game startup times. Still have many things to improve, including the previously mentioned |
Latest git build (1313+), Improve speed loading time a lot, thanks! |
The next couple of builds are gonna improve it even more I think, though not sure by how much. |
Note to self: Outrun is still very laggy when loading/saving. |
That's another couple of performance fixes in. I'm not saying that things are good, but they should at least be far better now. |
I'm gonna move remaining work to future versions. Maybe I'll get another fix in or two still, but need to move on to the other remaining issues blocking the release. |
I'm not sure if this is related to my issue, but it's the only thing I can consider. |
No one is saying it's related to specs. Unfortunately, it's a software problem in the operating system (Android.) Imagine that you lived in an area where you drove across a bridge on a daily basis. One day, the people who control the bridge decide to increase security. Now, to cross the bridge you must:
Now, even if you had a high-performance sports car, you'd find that these extra steps and back and forth would slow you down. This is what has happened with scoped storage - it is inarguably much slower, but Android (the people who control the bridge) have decided this increased security is necessary to protect the data on your storage. Try the latest git, though. It's not faster, but #15025 loads the replacement data in the background. This changes the lag/stalls to just show non-HD textures while the HD texture is still loading. The HD texture is used as soon as it loads. -[Unknown] |
How does this look now with a recent git build and recent Android version? I know texture dumping has also been improved. -[Unknown] |
It's definitely better now but I think there's more tweaks that can be done. Let's keep this assigned to Future-Prio, I'll consider it again for more work for the next version. |
@unknownbrackets @hrydgard Edit: I know this is a workaround |
Well, I think it could make sense to support a zip file (ideally uncompressed) or tar or something. It should be faster to find the files. I think that should be optional though, because when creating a texture pack it's handy to be able to iterate quickly and directly interact with the files, as well as add files while PPSSPP is running. That doesn't really help saves, although we could entertain an option to use a "memory stick image" file. It just means creating a whole file explorer and etc. You know, the things an operating system normally exposes. -[Unknown] |
How about this now? |
Well, we do what we can to minimize i/o. Our shader cache has always been efficient so that citra change doesn't really apply. |
There were also some improvements with savedata, although more are possible. I think most of the IO is already on a thread, but we could be less deterministic about timing and probably reduce stutter. -[Unknown] |
What happens?
I just upgrade to Android 11. Each game encounter heavy lag when trying to load in-game saves.
What should happen?
There should be no lag when trying to load in-game saves like in Android 10.
What hardware, operating system, and PPSSPP version? On desktop, GPU matters for graphical issues.
My phone is a Redmi K30 running android 11, SD730G, 6GB ram. PPSSPP version 1.10.3.
The text was updated successfully, but these errors were encountered: