Skip to content
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

Very slow http download speeds on Android #49218

Open
slasktotten opened this issue May 31, 2021 · 8 comments
Open

Very slow http download speeds on Android #49218

slasktotten opened this issue May 31, 2021 · 8 comments

Comments

@slasktotten
Copy link

Godot version:
3.3.2
Mac OS X (11.3)

OS/device including version:
Android 10 - Nokia 4.2
Android 7 - Samsung Galaxy S6

Issue description:
After updating our project from 3.2.2 -> 3.3.2 http download speeds have been incredible slow on Android using HTTPClient. Downloading a 50mb file has gone from taking roughly 10sec to 5-10min.
This issue only appears on Android. Iphone, Windows and OS X are working as expected.

@Chaosus
Copy link
Member

Chaosus commented May 31, 2021

cc @Faless

@Faless
Copy link
Collaborator

Faless commented May 31, 2021

I'll have a look, did you set use_threads = true? If yes, could you try disabling it? Maybe related to the old #33479 and the threading changes in 3.3? Sounds weird that it only happens on Android.

@slasktotten
Copy link
Author

slasktotten commented May 31, 2021

We are not using use_threads. However we have wrapped our call in a thread. If I naively move the code out of the thread, downloading becomes incredible slow across all devices (editor included).
It is worth mentioning that our Android devices are lower-end while the iphones are much more powerful (however this has not been an issue in the past).

If it somehow was related to threading it might explain why 3.3.2 has overall been performing quite a bit worse (much longer startup, lower framerate in our 3d world) on our Android devices then 3.2.2.

@slasktotten
Copy link
Author

slasktotten commented Jun 1, 2021

I managed to test on an HONOR 20 (fairly high end device) running Android 10 and on there everything ran as expected.

@dpensky
Copy link

dpensky commented Mar 29, 2023

It still happens. Downloading from iOS version or even the HTML5 version of my game the speeds are much higher.
I'm using this code:

download_destination = "user://" + filename
download_request = HTTPRequest.new()
add_child(download_request)
download_request.download_file = download_destination
download_request.connect("request_completed", self, "_http_request_completed")
var error = download_request.request(download_url)

and tracking progress with:

var body = download_request.get_body_size()
var downloaded = download_request.get_downloaded_bytes()

My test device is a Samsung A02S with Android 12
File is about 20Mb, hosted on a AWS machine.

@Calinou
Copy link
Member

Calinou commented Mar 29, 2023

@dpensky Which Godot version are you using?

@dpensky
Copy link

dpensky commented Mar 29, 2023

@dpensky Which Godot version are you using?

I'm using Godot 3.5.1
File sizes range between 9 and 23 Mb

@dpensky
Copy link

dpensky commented Mar 29, 2023

In my case, I realized that the problem only occurs when I'm using WIFI and not occurs when using the 4G network.
However, downloading files through the browser, for example, I do not notice this problem, quite the contrary, in general it is much faster to download through WIFI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants