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

Show the home screen as soon as possible #924

Open
samreid opened this issue May 17, 2023 · 3 comments
Open

Show the home screen as soon as possible #924

samreid opened this issue May 17, 2023 · 3 comments
Assignees

Comments

@samreid
Copy link
Member

samreid commented May 17, 2023

I recently saw a presentation about how minimizing the "time to load or show content" is important in determining the quality of the user experience. Most users launch a multi-screen sim by starting on the home screen, and most of our sims have >1 screen. So I'm wondering how quickly we can show the home screen, and load the other screens in the background once the home screen is displayed. This could be complex since it would modify the startup sequence, and phet-io has startup sequence constraints. There would also be corner cases for if you launch a sim with ?screens=1 or if a sim only has one screen. But I thought it was worth writing the idea down and seeing if we want to investigate. How much effort would be needed to estimate the performance speed up of just showing the home screen? We would still need to (a) download the entire HTML file (b) parse it and (c) initialize lots of scenery/joist/kite/dot/axon. So we would need to set a threshold about how fast the speedup would have to be for it to be worth the complexity to implement.

@jbphet @jonathanolson @zepumph @pixelzoom @kathy-phet @matthew-blackman do you think this is worth investigation? You can answer with 👍 👎 if you want.

@samreid
Copy link
Member Author

samreid commented May 17, 2023

Also I had some deja vu that we decided against this previously, but I couldn't find a paper trail. @matthew-blackman also commented that it would be unfortunate if a user clicks on a screen button and it doesn't load right away.

@pixelzoom
Copy link
Contributor

pixelzoom commented May 17, 2023

👎🏻

First, are we talking about a real problem here, or a hypothetical problem? I haven't experienced this problem with PhET sims. Which sims exhibit a "time to load or show content" problem? If this is not a real problem, with real examples that we can point to, then let's close this issue now.

That said... I suspect the benefits of doing this would be negligible to none, and the cost may be high. Off the top of my head, problems that we may encounter: What if the user (or fuzzing, or CT!) clicks on a home screen button before the associated screen is loaded? Does incrementally loading the sim create any PhET-iO challenges?

Finally... Doesn't the progress bar already fill this need? We are showing the progress bar "as soon as possible". It gives immediate feedback ("content") while the sim is loading. Why do we need to show the home screen as soon as possible?

@pixelzoom pixelzoom removed their assignment May 17, 2023
@jbphet
Copy link
Contributor

jbphet commented May 17, 2023

I just tried loading a couple of multi-page sims from on campus and used the stopwatch on my phone to measure the time between clicking on the sim in the sim page and the moment when the home screen becomes visible. CCK DC took ~2.1 seconds, States of Matter took ~1.4. This feels acceptable to me, and since we could only improve the amount of time after the load and interpretation of the HTML file, it doesn't seem like there is a lot of room to produce a perceptible improvement. So sorry, but I don't feel like this is worth the time at the moment. Bigger fish to fry.

@jbphet jbphet removed their assignment May 17, 2023
@zepumph zepumph removed their assignment May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants