Moguri / panda3d-gltf

glTF utilities for Panda3D
BSD 3-Clause "New" or "Revised" License
82 stars 19 forks source link

Do not cache temporary .bam file #116

Closed rdb closed 1 year ago

rdb commented 1 year ago

Currently, panda3d-gltf works by creating a temporary bam file and loading that using Panda's loader.

Firstly, it should be considered whether this is necessary, and why we can't load the file directly instead. Aside from the performance cost, I worry that there might be unknown side-effects to doing it in a two-step manner.

If we need to go this route, I would suggest that we pass in LoaderOptions flags when loading the temporary .bam file so that caching is disabled. Otherwise, every time we are loading a .glTF file, we are duplicating the memory usage in the RAM cache and we are causing the in-disk memory cache to grow continuously, since the source filename is different every time.