Multi DracoLoader instance crash on iphone/safari

I have 3 different glb’s exported from blender that I use in my web page.
I use loader with draco, on chrome and in general on the desktop everything works fine but when I try on my iphone (safari) the page crashes. How can I solve this problem?

Very often, you don’t need to have three models, but a poorly optimized one is enough to crash mobile browsers, like memory limits etc… First, you need to undertake several strategies to optimize the model as well as the scene itself. Here are some tricks on how to do it. Also take a look at the models themselves in Blender, try to load only one of them, etc.

Tips_1
Tips_2
Tips_3

  1. Reuse the DRACOLoader instance for all models, to avoid creating more Web Workers than needed
  2. Optimize your models. Draco makes the files smaller on disk, but does nothing to improve rendering performance. Consider tools like glTF Transform or gltfpack for this purpose. Lots of options here, but for example:
npm install --global @gltf-transform/cli 

gltf-transform optimize in.glb out.glb --compress draco --no-instance

To give more specific advice on optimizing the models it would be necessary to know more about what’s in them, or to share the files. Common issues are large textures, high vertex counts, high draw call counts, etc.