KhronosGroup / UnityGLTF

Runtime glTF 2.0 Loader for Unity3D
MIT License
1.77k stars 483 forks source link

Unity freezing during file read and massive memory usage #486

Closed murphysurveys closed 5 months ago

murphysurveys commented 4 years ago

I have a GLB model of engineering data (pipes) without textures, which is 40MB size.

During loading using the BinaryBoomBox test scene with the model as the URI, Unity freezes for approximately 2.5mins during the file read operation but seems to execute the GLTF parsing component in less than 1 second despite a low frame budget.

In comparison, the total file read and parse time using Dan McCurdy's online viewer is less than 5 seconds.

Also, I am not sure if significant memory usage is a normal behaviour, it appears that over 800MB of memory is needed when the file is used.

I attach the file in question here: https://www.dropbox.com/s/rjxjxmvejxj6ug1/Mercury_Trinity.glb?dl=0

Is the freezing and large memory usage an issue to rectify or a fundamental limitation of loading files in this way?

pfcDorn commented 5 months ago

Thanks for the file! This helped a lot to optimize! I already get it from importing 2 minutes to under 4 seconds :) https://github.com/KhronosGroup/UnityGLTF/pull/687