When downloading an editor version, the progress of the download slows down a lot (maybe >10x?) if the application window loses focus. Download speed resumes to normal speed if focus is regained.
This seems to be the culprit:
|
func _notification(what: int) -> void: |
|
if NOTIFICATION_APPLICATION_FOCUS_OUT == what: |
|
OS.low_processor_usage_mode_sleep_usec = 100000 |
|
elif NOTIFICATION_APPLICATION_FOCUS_IN == what: |
|
OS.low_processor_usage_mode_sleep_usec = ProjectSettings.get( |
|
"application/run/low_processor_mode_sleep_usec" |
|
) |
I've played around with the HTTPRequest in a test project, and there's a few ways this could be fixed, but I think the simplest and most effective would be to simply enable the use_threads property on the HTTPRequest node in asset_download.tscn to decouple the download process from the reduced application frame rate, otherwise we can only download one chunk (64kB by default) per 100ms when the window does not have focus
When downloading an editor version, the progress of the download slows down a lot (maybe >10x?) if the application window loses focus. Download speed resumes to normal speed if focus is regained.
This seems to be the culprit:
godots/src/main/gui/gui_main.gd
Lines 142 to 148 in 72d4df0
I've played around with the HTTPRequest in a test project, and there's a few ways this could be fixed, but I think the simplest and most effective would be to simply enable the
use_threadsproperty on the HTTPRequest node inasset_download.tscnto decouple the download process from the reduced application frame rate, otherwise we can only download one chunk (64kB by default) per 100ms when the window does not have focus