This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
+2 votes

We are using HTTPRequest node to download a file from the server. There is a progress bar that is polled every second to read getdownloadedbytes() and set the progress to the amount downloaded.

Separately to that there is a listener on the signal for request_completed - i.e. if that signal fired before the progress bar completed the loading scene would complete.

On Desktop the file takes around 10 seconds to download and the progress bar moves along as expected.

On HTML5 export the browser dev tools show a similar download time (~10 seconds) and then they stop, but the http request has only downloaded about 25% of the bytes at that stage (and the progress bar shows this). getdownloadedbytes() continues to increase periodically for another 30-40 seconds and fill the bar and the request_completed signal is fired. But for those 30-40 seconds the browser dev tools don't show any activity - the file has already been downloaded as far as the browser is concerned.

Second request e.g., on refresh, the file is cached and takes no time at all.

What is happening? And why the large discrepancy between download times? 10 seconds on desktop vs 40 - 50 seconds on html5 on the same machine in the same network.


in Engine by (25 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.