Home > database >  Three.js freezes Chrome completely, huge texture in GLTF model
Three.js freezes Chrome completely, huge texture in GLTF model

Time:12-08

I want to load a ludicrous, binary glTF object with only a few polygons (~250), and a huge texture of size 10,000 x 5,500 pixels. The file is "only" 20MB in size.

When I load it using Three.js, Chrome hangs in its entirety for nearly 15 seconds. When looking in the profiler, pretty much nothing is going on during the freezing time.

If you want to load the file yourself, you can download it at Chrome Profiler

The behavior stays the same, whether I call GLTFLoader.load(), GLTFLoader.loadAsync(), or create my own Promise, and call .then(addToScene), without any awaits.

Does somebody have a magical solution? Or if not, how could I profile it more efficiently, seeing the internal calls? Or should I just open a bug report for Chrome/Three.js?

PS: Windows 10 Personal, Ryzen 5 2600, 32 GB RAM, RX 580 8GB.

CodePudding user response:

The issue should be resolved by upgrading the library to r135(the current release).

The releases r133 and r134 have a change that introduced a performance regression on Windows when using sRGB encoded textures.

  • Related