UnityGLTF icon indicating copy to clipboard operation
UnityGLTF copied to clipboard

Adding multithreading support

Open Zichuan-Wang opened this issue 8 years ago • 1 comments

Hi there,

As some of you may have experienced, currently the UnityGLTF library blocks the main thread when importing models containing complex geometry and/or textures. Although the coroutine approach is used in the project, sometimes multithreading may be a better solution as it provides a non-blocking behavior as well as better performance (in some situations) Please see #221 for details!

Performance HUGE frame rate increase for certain models containing complex geometry and/or textures. I observed up to 500% fps increase for this model on a Windows desktop computer. In general, it should increase your fps and/or decrease the main thread freezing time. It should not make any tangible negative impact to the loading time, if no faster loading is observed.

Comparison Chart image Model 1: Complex link Model 2: Complex link Model 3: Simple link Model 4: Simple link Test performed 3 times for each model and each importer (original vs proposed). Test machine: Windows 10 64 bit, i7 7700K, GTX 1070, SSD.

Reference: #216

Zichuan-Wang avatar Aug 23 '18 04:08 Zichuan-Wang

Thanks for the contribution!

ericob avatar Jan 04 '19 22:01 ericob