Open samreid opened 1 year ago
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.
ππ»
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?
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.
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.