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

html5 progress bar stays at 0% when archive files are gzipped #5097

Closed
GreenArrow18 opened this issue Aug 14, 2020 · 2 comments · Fixed by #5211
Closed

html5 progress bar stays at 0% when archive files are gzipped #5097

GreenArrow18 opened this issue Aug 14, 2020 · 2 comments · Fixed by #5211
Labels
bug Something is not working as expected html5 Issue related to the HTML5 platform
Projects

Comments

@GreenArrow18
Copy link

Describe the bug (REQUIRED)
If the files inside the archive folder are gzipped server-side (the arcdX files in particular), the progress bar is shown at 0% and stays there. It does not show any loading progress while the files are being downloaded. From 0%, it goes straight to the fully loaded app.

To Reproduce (REQUIRED)
Steps to reproduce the behavior:

  1. Open Chrome developer console
  2. Select a 3G network preset to simulate a slow connection
  3. Load the app's page
  4. After the engine has been loaded, note that the progress bar will be shown with 0% progress
  5. Progress bar stays at 0% all the time, then the app is fully loaded. No loading progress is shown at all

Expected behavior (REQUIRED)
Progress bar should show progress from 0% to 100% as the archive files get downloaded.

Defold version (REQUIRED):

  • 1.2.172

Platforms (REQUIRED):

  • Platforms: HTML5
  • OS: Windows 10
  • Browser: Google Chrome

Workaround (OPTIONAL):
Do not gzip the files in the archive folder. The progress bar will work as expected, but then you lose the advantage of further reducing download size.

Additional context (OPTIONAL):
File savings when you gzip the archive files are significant (25% or more). For html5 builds, it's very important that the app loads as quickly as possible, so using gzip server-side is almost mandatory. At the same time, the progress bar is also important as it gives the users a visual clue that something is happening in the background.

So we need the progress bar to work when the files in the archive folder have been gzipped.

@GreenArrow18 GreenArrow18 added the bug Something is not working as expected label Aug 14, 2020
@britzl britzl added the html5 Issue related to the HTML5 platform label Aug 16, 2020
@britzl britzl added this to To do in 1.2.174 - iOS 14 via automation Aug 16, 2020
@britzl britzl removed this from To do in 1.2.174 - iOS 14 Aug 28, 2020
@britzl britzl added this to To do in 1.2.175 via automation Aug 28, 2020
@britzl britzl linked a pull request Sep 16, 2020 that will close this issue
@britzl britzl moved this from To do to In progress in 1.2.175 Sep 22, 2020
@d954mas
Copy link
Contributor

d954mas commented Oct 6, 2020

Hi cool feature.
It will be better if you move wasm size and percents to constants. So user can configure progress bar.

Thanks.

Use it in my current project. Worked good.

@britzl
Copy link
Contributor

britzl commented Oct 6, 2020

@d954mas I pushed a new commit to the PR. The new commit exposes the values on the EngineLoader object so that you can change them if you use your own engine_template.html

65daeef

1.2.175 automation moved this from In progress to Done Oct 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working as expected html5 Issue related to the HTML5 platform
Projects
No open projects
1.2.175
  
Done
Development

Successfully merging a pull request may close this issue.

3 participants