-
-
Notifications
You must be signed in to change notification settings - Fork 21.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
on Android ,File Class use [seek] function ,need so long time!!!! #58872
Comments
@CoderMzx Please upload a minimal reproduction project to make this easier to troubleshoot. |
on PC build, is no problem.
|
I found the reason why the seek function took too long. I try to download the file to the user folder of the mobile terminal, and then use the file class to read it. In this case, the seek function has no delay Once binary resources are separated from PCK, the efficiency of seek will return to normal If binary resources are packaged into PCK files, it will take 0.1 ~ 0.3 seconds to seek forward |
I solved the problem by reading from the user folder. I hope this is caused by my usage rule error, but please add this special usage to the official documentation. Hopefully this will help Godot develop better on mobile. Otherwise, the Godot engine is very misleading to beginners |
CC @m4gr3d |
I don't think they're related since this was in 3.4.3, while the scoped storage update was only introduced for the 3.5 branch.
This implies this is tied to the performance of the pck format on Android for large projects. The Tesla engineers ran into a similar performance issue a while back, so this may be something worth looking into to see if we can improve. @CoderMzx Which version of Android are you running on. |
@akien-mga @reduz Are there docs describing the pck format? |
I don't remember seeing a specification for the PCK format, but https://github.com/bruvzg/gdsdecomp may have some reverse engineering notes. |
Godot version
3.4.3
System information
Android
Issue description
i build a Android Project,
my Game need to read bin File,
if i use File class and use seek function, the function is need so long time, my game is no response.
Steps to reproduce
Build Android Project, use File class to read binFile,
var _fp = File.new()
_fp.open("xxxx",Read)
_fp.seek(5000) <---- need so long time
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered: