SceneLoader.ImportMeshAsync is blocking all tabs in the browser

Hello!
Why is this happening? When I’m loading a bigger model (200 MB) the browser even shows a “Page is not responing” alert. The blocking starts after the file gets loaded. I believe when the model gets created in the webgl context the overhead is too big and it’s blocking the whole browser. Can this be somehow managed?
Thank you!
R.

Hey Roland can you link the playground? :slight_smile:
(If it’s possible)

You could try to use babylon on a worker thread with offscreen canvas.

A lot of things can be serial during load and a huge model might take a long time to parse for instance. As @msDestiny14 mentionned a repro would help.

Don’t forget the handy “Loading” image feedback you should give the user while you wait. :joy:

Yes, I’m doing in with a cool particle effect in a webworker and offscreen canvas :smiley: but it gets blocked too. And the CSS animations stops as well. The whole browser becomes unresponsive. I can’t even change the tabs while it’s parsing/creating (whatever is does). This is happening with smaller models (30MB) too, however the blocking period is much shorter but it totally disrupts the particle loader effect and the css animations. :frowning:

I’ll create a PG.

Thanks!

1 Like

The progressive load page might be of some help too? :smiley:

Hello! :slight_smile: Thank you for your suggestion! This unfortunatelly doesn’t solve the problem because the problem starts after the model is fully loaded. The loading phase is smooth. I’ve already created a PG and shared it with @msDestiny14 in a private message. I couldn’t share the model file in a public post. :frowning:

Maybe related? Windows/chromium angle issue with some gl rgb thing causing super jank after load. SRGB8_ALPHA8 blocks the main thread · Issue #22631 · mrdoob/three.js · GitHub

It seems like using a webgl1 or webgpu canvas could check for this issue specifically, maybe worth a try

2 Likes

Hello!
Thanks for sharing this link! I’ve just discovered that removing all the textures helped the situation and it loads smoothly. So it seems to be heading that way! I was curious and tried to load the model in three.js and it was like 5x worse than in BJS and it didn’t load properly at the end.

1 Like