Loading gltf in the background causes frame rate degradation

Howdy @Deltakosh @bghgary ,

I’m building an experience where I need to load 10 .glb meshes w/ animations. Each is using Dracco compression to get the files down to about 5mb each. I’m using the asset manager to add each to their own manager and then deferring each .load() until the previous has finished. Allowing me to get the 1st character on the scene quickly.

The problem I’m seeing is that when the first character is already on the canvas…the frame rate for the animation will suffer if I load in additional assets in the background via the assets manager. Is there a way to prevent this from happening?



Is this where an Asset Container Task would be helpful? I’m trying to find a way to load the .glb files without causing the fps to drop below 60.

Here’s a PG illustrating issue. Still happens even with AssetContainer:

With Mesh Instantiation:

Without Mesh Instantiation:

Notice that when the second asset manager is loaded…the frame rate drops. This happens whether I instantiate the model to scene or not.

I would have thought that loading assets wouldn’t bind the GPU so much.

Thanks for any help @Deltakosh



this is expected because of JavaScript ;( We only have one thread to work with webgl)

So based on that information, you can imagine we cannot load things and keep the rendering as the same time. We tried to push really hard on the JS community some times ago to get better threading support but so far there is no sign of changes on that front

and the problem here is not on GPU but on CPU which struggle to load the data, create the webgl info AND simultaneously (kind of ;)) render the scene 60 times per sec

The best option is to preload as much as you can before rendering

1 Like

Gotcha. This makes sense. I appreciate your help!

1 Like