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

Splash/progress bar stays at 0 for too long on slow connections? #397

Closed
arnabp opened this issue Jan 17, 2017 · 5 comments
Closed

Splash/progress bar stays at 0 for too long on slow connections? #397

arnabp opened this issue Jan 17, 2017 · 5 comments
Assignees

Comments

@arnabp
Copy link
Contributor

arnabp commented Jan 17, 2017

When testing the latest splash screen demonstration from phetsims/tasks#764 I noticed that at slower speeds, the progress bar doesn't seem to accurately depict the progress of the loading of the sim.

For example, when I throttle the speed of chrome down to 250 kb/s, the splash screen takes 26 seconds to come on, then the loading bar is at 0% for 29 seconds, then the loading bar goes from 0 to 100% in less than a second. While the 26 seconds of loading for the splash screen to appear makes sense to me, it seems inaccurate for the loading bar to only actually be loading for a fraction of the time the sim actually takes to load. Is this a bug? Is there a good way to fix this?

screen shot 2017-01-17 at 3 07 42 pm 2

In the image, the blue blip for "data:image/svg+xml;..." is when the splash screen appears and the green blip in "sanity.gif/pingver=2&project=faradays-law&version=..." is when the bar begins to actually move.

@ariel-phet
Copy link

@arnabp thanks for the report. The loading bar should step incrementally I would think given the way @samreid has it implemented, so kicking this question to him.

@BryceAG
Copy link

BryceAG commented Jan 23, 2017

I have done some testing with the speeds myself, and compared it to the old splash. It seems that at any speed, both with the old and resizing splash, the loading bar doesn't actually show progress incrementally until the last second or so. It also looks like the resizing splash will only show the bar at 0%, ~20%, and full, where as the old splash would go 0, 20, 40, 60, 80, full at the last moment.

@samreid
Copy link
Member

samreid commented Jan 28, 2017

As long as we constrain ourselves to single-html file solutions, we cannot show the progress bar for the sim to be downloading. Instead, the progress bar shows the progress of the sim as it runs JavaScript code after it has already fully downloaded. The original task #68 was split into the two subtasks:
Show animation while HTML is downloading #349
Show progress indicator while JS loading #348

We have an idea about how to show an animation during the download, but it would require moving to a multi-file approach instead of a single file approach which we have used up until now. Hence, we have focused our efforts on showing the progress indicator during the JS loading phase. We also justified this to some extent by arguing that many browsers show a download progress indicator, such as underneath the URL text bar (though I don't see anything like that in the Chrome beta).

It may be possible to intersperse DOM updates through the HTML file as it loads, but it would probably be very "jumpy" with a few number of very coarse steps, or may not work at all. I'll note this as a possibility in #349.

Reassigning to @ariel-phet for discussion.

@ariel-phet
Copy link

Commented in #349, unassigning myself

@ariel-phet ariel-phet assigned samreid and unassigned ariel-phet Jan 31, 2017
@samreid
Copy link
Member

samreid commented Feb 2, 2017

We'll investigate this in #349, closing.

@samreid samreid closed this as completed Feb 2, 2017
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

4 participants