mirror of https://github.com/mosra/magnum.git
Browse Source
Memory-maps the file and uses openMemory() instead of openFile(). For efficient data formats (such as glTF) can avoid reading the whole blob if only the metadata or a part of the file is needed (for example the peak usage for --info-materials with the Buggy.glb example model went from 8.5 MB to 991 kB, as it reads just the JSON at the start and never even pages in the buffer blobs at the end). This currently only works for standalone files, files that reference external images etc. would need to have file callbacks implemented. And it's Sunday and I'm lazy.pull/240/head
2 changed files with 21 additions and 4 deletions
Loading…
Reference in new issue