A set of open c++ game development tools that are lightweight, easy-to-integrate and free to use. Currently hosting a magicavoxel .vox full scene loader.
MIT License
375
stars
36
forks
source link
_vox_array::resize optimization - grow by at least 1.5x #29
Discovered that during vox file loading resize was being called with count+1, with capacity only being increased by 1 each time leading to very slow file reading for vox files with lots of models & instances - one file with many tens of thousands of such was taking over a half hour to load (I cancelled!), whereas after this optimization it took 18 seconds (including converting to my octree format in Avoyd).
This PR changes the resize to use the same approach you use elsewhere to avoid too many resizing calls.
Discovered that during vox file loading resize was being called with
count+1
, with capacity only being increased by 1 each time leading to very slow file reading for vox files with lots of models & instances - one file with many tens of thousands of such was taking over a half hour to load (I cancelled!), whereas after this optimization it took 18 seconds (including converting to my octree format in Avoyd).This PR changes the resize to use the same approach you use elsewhere to avoid too many resizing calls.