-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
High memory consumption if tiles.json is big #3453
Comments
3D Tiles supports a tileset referencing another tileset by having a tile's I also agree that 400,000 empty tiles should not use up that much memory; we'll look into that. By the way, what are you building with 3D Tiles? |
We are currently trying to get a some of our point clouds into cesium. This was a try with ~5% of our data of a single city ;-). |
Some early results for this... If the tileset.json is completely empty it works fine. My tileset.json is 62 MB with 349525 empty tiles, basically it's just an 9-level quadtree. It takes about 10 seconds to load for me but afterwards runs fine. The chrome process is hovering around 1328 MB. With the same tiling scheme but with content in each tile (around 6K per b3dm), it crashes for me. |
It seems like the problem is related to bogging down the promise system. I turned off the Just for reference: function addContentReadyPromise(tile) {
// Content enters the READY state
when(tile._content.readyPromise).then(function(content) {
if (defined(tile.parent)) {
--tile.parent.numberOfChildrenWithoutContent;
}
}).otherwise(function(error) {
// In this case, that.parent.numberOfChildrenWithoutContent will never reach zero
// and therefore that.parent will never refine. If this becomes an issue, failed
// requests can be reissued.
});
} |
|
In the case with tiles that have content, none of the ready promises are ever resolved because I turned off the update loop so no requests are made. The empty tiles have always worked fine since they resolve immediately. |
Had now time to test it: No Chrome is still crashing. And just an general question: At the time Cesium is loading this big tileset.json it stopping rendering. So that Cesium works asynchronous means only order of execution is not fixed, but it is still single threaded and uses no web worker, or? |
@SunBlack can you share your tileset with us for testing? As of now, web workers are used for processing vector data, but we plan to extend this usage. |
@SunBlack if you have a chance can you retry this tileset on the latest |
Cesium isn't crashing anymore, but still requires 1,3GB RAM for this 80MB tileset. |
@SunBlack can you share your tileset with us for testing? |
Brought up on the forum: https://groups.google.com/d/msg/cesium-dev/2ORBapD2kBg/2Q-6ZgJ9BAAJ #6390 may help by reducing the number of properties a |
As for now, what will you suggest if I have so many modules to show in Cesium? |
Usually it is a good idea to split up a large tileset.json file into multiple smaller tileset.json files and link them via external tilesets. It saves initial download time and means |
Also reported in #12049. There are some useful profiling results listed in that thread as well. |
External tilesets themselves create a memory issue, because they are never deleted from the tree. See this forum thread and the related issue in cesium-native. |
We have a KdTree with ~400.000 (each tile is 200KB) nodes in a single tiles.json (82MB Json file in compact mode). If I open cesium with this tiles.json Chrome crashes and Firefox starts using ~3GB of memory - even if no tile will be loaded. A possible solution for me will be to split tiles.json in multiple once (I hope), but nevertheless someone should take a look at parsing tiles.json to save memory/cpu time (e.g. create Cesium3DTile on demand and not at loading time of tiles.json)
The text was updated successfully, but these errors were encountered: