All tiles are stored in memory in a tileset object before being written to JSON. This is not feasible for geocells that go down to level 23 (potentially terrabytes).
Instead, making the b3dms and gltfs should be separate from writing the tileset jsons. This can be multithreaded.
After the content files are written, availability buffers for subtrees can be written to disk. A process would parse the b3dms and know which buffer to write to. All the buffers aren't kept in memory but rather opened and written to one at a time in this way.
All tiles are stored in memory in a tileset object before being written to JSON. This is not feasible for geocells that go down to level 23 (potentially terrabytes).
Instead, making the b3dms and gltfs should be separate from writing the tileset jsons. This can be multithreaded.
After the content files are written, availability buffers for subtrees can be written to disk. A process would parse the b3dms and know which buffer to write to. All the buffers aren't kept in memory but rather opened and written to one at a time in this way.