You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue description:
I had an issue with the when a 7Mb jpg file of a satellite image took 450ms in load_jpg_from_buffer() for godot to uncompress/decode. This froze everything up and caused network polling problems.
See godotengine/godot#20056 (comment)
I think I fixed it by putting my Image loader into a thread.
At the moment the multiple threads tutorial page (link below) uses a completely contrived example of incrementing a counter.
It would be more useful if the example instead applied to decoding a big binary object (like a jpg) as this is likely to be the first application a programmer is going to be forced to use threads in godot for. My implementation is here.
Then you can have a hint on the Image.load() documentation that this can hang the system if it's a big file, but there is a solution. I do not think that ResourceInteractiveLoader helps here because (a) it doesn't apply to downloaded files in the user:// directory, and (b) that interactive loader will still call the image loading function as a single frame-hanging blob.
Your Godot version:
3.2.3.stable
Issue description:
I had an issue with the when a 7Mb jpg file of a satellite image took 450ms in load_jpg_from_buffer() for godot to uncompress/decode. This froze everything up and caused network polling problems.
See godotengine/godot#20056 (comment)
I think I fixed it by putting my Image loader into a thread.
At the moment the multiple threads tutorial page (link below) uses a completely contrived example of incrementing a counter.
It would be more useful if the example instead applied to decoding a big binary object (like a jpg) as this is likely to be the first application a programmer is going to be forced to use threads in godot for. My implementation is here.
Then you can have a hint on the
Image.load()
documentation that this can hang the system if it's a big file, but there is a solution. I do not think thatResourceInteractiveLoader
helps here because (a) it doesn't apply to downloaded files in theuser://
directory, and (b) that interactive loader will still call the image loading function as a single frame-hanging blob.URL to the documentation page (if already existing):
https://docs.godotengine.org/en/stable/tutorials/threads/using_multiple_threads.html
See also #2148
The text was updated successfully, but these errors were encountered: