phetsims / build-a-molecule

"Build a Molecule" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
8 stars 7 forks source link

BaM is taking a very long time to load on ChromeOS and Android #224

Open oliver-phet opened 3 years ago

oliver-phet commented 3 years ago

@mattpen found that on his Android and Chromebook devices, BaM takes quite a while to load. Android phone ~20 seconds. Chromebook ~10 seconds. @KatieWoe can you describe the devices you have tested BaM and note their load performance:

Device and OS Version Load time
Device 1 Load time 1
Device 2 Load time 2
KatieWoe commented 3 years ago

Used published for this

Device and OS Version Load time
Win 10 Chrome 5.39 sec
Win 10 Firefox 4 sec
Mac 11 Safari 3.66 sec
iPad 14 5.7 sec
ChromeOS 31 sec
Android Tablet 43.25 sec
mattpen commented 3 years ago

Assigning to @jonathanolson since he is the responsible dev for build-a-molecule.

jonathanolson commented 3 years ago

This is partially expected, it has to load a LOT of data. @oliver-phet, any preferences on the balance between load-time of the sim and download size? At a certain level there's a tradeoff, but I could take a look into optimizing things (I'm sure I could help improve things).

oliver-phet commented 3 years ago

@jonathanolson do you have a perspective on why the sim takes so much longer to load on Android and Chrome specifically? When I load the sim on my iPhone (in our iOS app or mobile safari) the sim only takes ~3 seconds to load. I appreciate the tradeoff between load-time and download size, but it is surprising that those two platforms are experiencing such long load times.

jonathanolson commented 3 years ago

do you have a perspective on why the sim takes so much longer to load on Android and Chrome specifically?

I'm not sure. It's a very specific CPU task that allocates a lot of memory. It's probably fairly dependent on the CPU and memory, and heavily dependent on browser optimizations and GC.

jonathanolson commented 3 years ago

I could profile it presumably to see why this might be happening?

oliver-phet commented 3 years ago

Yes, @jonathanolson profiling sounds like the next best step! This would be good to diagnose before our next Chromebook app goes out.