I have a working project that loads GLB files into the scene. A 90 MB scene takes just under a second to load in the local development environment. I added an animated GIF loading image to display while loading. It exists as pure HTML/CSS in a div element that gets set to visible to show and hidden to hide. If I show the animated GIF, the GLB file takes about 19 seconds to load. I am trying to understand why it has this much of an impact. Is the browser spending so much time animating the GIF that it can’t process the JS code efficiently?
I also noticed a similar slow down when using
onAfterRenderObservable. If this event was processing data while the loading was taking place, it took a really long time to load the GLB. So, I added a flag to only do processing after the GLB was loaded and this solved this problem.
On a similar note, I have noticed that enabling
BABYLON.SceneLoader.ShowLoadingScreen also impacts loading times.