donmccurdy/glTF-Transform

Join command runs out of memory

Closed this issue · 2 comments

Describe the bug
After eating 31GB of RAM the process gets OOM-killed

To Reproduce
Steps to reproduce the behavior:

  1. Install v4 alpha
npm install --global @gltf-transform/cli@next @gltf-transform/core@next @gltf-transform/extensions@next @gltf-transform/functions@next
  1. Download the attached GLTF (700MB unpacked)
    https://www.dropbox.com/scl/fi/q1uisxtqoe7hj4d5gzm1r/world.zip?rlkey=1gt9q5t4ns9v8xwwx8gy6geo2&dl=0

  2. Run the following command to join meshes

gltf-transform join world.gltf world-transformed.glb
  1. OOM Killed 💀

Versions:

  • Version: 4.0.0-alpha.10
  • Environment: node

Thanks for the report, @thecatontheflat! I think this issue has the same root cause as #1315, so I'm going to merge the two issues. I've copied over some details from this report as well. If you need a workaround in the meantime, I found that running weld first, followed by join, will complete. The weld step is still slow (also tracked by the issue above), but keeps a more reasonable memory footprint for a file this size.

The workaround has worked! Thanks for the suggestion!