-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
ResourceLoader.load_threaded_request blocks main thread #79117
Comments
I might have a clue: |
Loading textures is not asynchronous yet – this requires making RenderingDevice thread-safe. You'll probably want support for texture streaming as well, which is planned for a future release. |
So there's literally no way to load textures without stalling main thread? That's a bummer. Any idea when this will be addressed? |
Rendering contributors are busy with other tasks, so it will be a while before texture streaming is implemented. (Also, texture streaming will only be supported for rendering in 3D, not 2D.) |
Sure, I meant to ask about the asynchronous loading. We designed our 2D game's overworld to be "seamless", but I guess for now we are stuck with some stutters (there are too many textures to preload) |
You can stagger texture loading over time, and split large textures into several smaller textures. |
Godot version
4.1
System information
Windows10, AMD Ryzen 9 5900X, NVIDIA GeForce RTX 3060 Ti, driver version 30.0.15.1179, compatibility.
Issue description
I try to show a progressbar while loading a scene in background.
_process() of the caller is called only once while loading though. It seems like the main thread is blocked.
Steps to reproduce
Start the repex and notice that it takes (for me) 3s to load the new scene, but _process is called only once with a delta of 0.016666s.
Minimal reproduction project
threaded_loading_repex.zip
The text was updated successfully, but these errors were encountered: