Closed lilleyse closed 1 year ago
Why not include the memory size of tile in the tile information of JSON
@PolanZ that's a good idea and could be something that's included in some future extension to 3D Tiles, e.g. 3DTILES_tile_metadata. Just note, the extension there is a very early draft.
@lilleyse May I know if there's any update on this? We have several large models and crash after loading for a period of time. It's ideal to have an option to limit global memory usage.
@asir6 Hi! I wanna know how big your model is. I try to load a large 3D tiles model more than 200GB now. The page runs of memory and crashes all the time. Have you ever been in the same situation?
@heylying Have you found a solution? I have a 40g file to load
@iiixxxiii On the one hand, we are trying to optimize the model files. On the other hand, I upgrade our old Electron. At the same time I use --max-old-space-size=xxx to increase the memory limit for Node.js. Now it can load the model successfully at least.
@iiixxxiii一方面,我们正在尝试优化模型文件。另一方面,我升级了我们的旧电子。同时我使用 --max-old-space-size=xxx 来增加 Node.js 的内存限制。现在它至少可以成功加载模型了。
大佬,有最近解决方法么。 先说配置
Hi, I also just ran into this "trap".
Especially with point clouds it's hard to optimize every tileset in a way that prevents the browser from crashing when big datasets are loaded.
So any solution that would enforce a real memory limit would be very helpful, although obviously the render quality will suffer in cases where visible tiles can't be loaded or have to be removed again. Still way better than a crashing browser tab. :D
Did anyone ever work on this? I'd be happy to have a look on it, "hack" something that works for us and then maybe provide a more general solution or at least some starting point for someone else.
Hi @UniquePanda,
No one is currently looking into this to my knowledge. We'd be happy to discuss a solution, or review a PR if you get to that point. Thanks!
For a
Cesium3DTileset
, themaximumMemoryUsage
property controls the size of the tileset's cache but does not actually limit how many tiles are loaded. As the doc states:The name is a bit misleading and should really be called
cacheMemoryUsage
.Really
maximumMemoryUsage
should force the tileset to never consume more than that amount of memory. This could be done by sorting all tiles by screen space error and only loading those with the greatest error until the memory limit is hit. We could also prioritize requests based on SSE as well so we don't end up requesting tiles that won't fit. Unfortunately we don't know a tile size until it is downloaded but we can save that value for later use if the tile is unloaded.We'll also have to deal with the issue of request thrashing when the maximum memory usage is nearly reached. It may help to reserve some of the memory as a cache.
Going beyond, we should have a global
maximumMemoryUsage
that is shared by all tilesets loaded in the scene.