GLTF Loader: Binary file is loaded twice

Hey everybody!

I recently joined the babylonjs community and so far I am pretty happy working with this framework, thanks for developing and open sourcing it :slight_smile:

There is however one problem we are currently facing in our business app. The GLTF loader is loading the associated .bin files twice. This can be reproduced with (I believe) any gltf loading example. Here is one demo project from the babylonjs documentation which loads a skeleton head:
https://www.babylonjs-playground.com/#JA1ND3#48

You can observe the duplicated loading in the chrome dev network area:

Could you please take a look at it?

Hi @wkroeker and welcome to the forum!

Let me take a look at it …

In the playground, the glTF validator is turned on by default. The two bin loads are due to that. At some point, we may be able to consolidate the code such that it doesn’t do this, but it shouldn’t be an issue in production environments.

2 Likes

You are supposed to be able to turn off the validation in the inspector, but it’s not working right now for some reason. I’ll look at this.

In the meantime, you can do this in the code to disable validation.
https://www.babylonjs-playground.com/#JA1ND3#282

Thank you!
For us the production build matters the most. It’s not a big deal if the binary files are loaded twice in dev mode. We will remove the inspector dependency to fix the issue.

Turning off the validator is helpful though, thanks. The decreased loading time of our app will increase development efficiency.

1 Like

Filed Turning off glTF validation doesn't work in the the playground inspector · Issue #8925 · BabylonJS/Babylon.js · GitHub for this.

2 Likes