OBJFileloader freezes for a while with high poly models

Hi,
I’m developing a 3D file viewer for big 3D files (50 to 200mb) and I’ve found that when using the onProgress callback in SceneLoader.ImportMesh for these high poly OBJ meshes, the progress stops taking into account the event.loaded info and it freezes for a fair amount of seconds (depending on the size of the file). It works fine with STL and GLB (the browser don’t freeze and the progress info is correct).

I’ve tried to set up a playground with a big OBJ file (around 80MB):
https://www.babylonjs-playground.com/#K362ZD

There you can not see the progress as it seems that the server is not providing the right content header and the event.lengthComputable is not true, but if you take a look at the console, it stops after 6-8 “loading” logs and takes some time to log the “success”. In those seconds, the browser is completely freezed.

Regards!

@Drigax, any idea ?

No idea. Most likely we’re doing something inefficient synchronously. I’m not too familiar with the OBJ loader to pinpoint what quickly.

np no rush @Drigax, let us know what you find :slight_smile: