I am loading a lot of GeoJSON data into my CesiumJS map via the GeoJsonDataSource
abstraction:
let ds = await GeoJsonDataSource.load(f)
await this.viewer.dataSources.add(ds)
This operation is timed, and it takes about 2000ms (2.0s) to perform the operations shown above. Clearly some amount of computation is being performed here to take up so much time.
However, the map is generally designed to perform any heavy computation operations in the background; usually via the use of WebWorkers (ES6Workers). My GeoJSON is entirely comprised of Polygon type primitives. Somewhere, the library is using earcut to triangulate all of those polygons into something that can be rendered in a 3D OpenGL scene. That triangulation operation should be quite heavy/time consuming.
After the the initial globe display first loads, it takes another 15-20s for my geometry to also be ready to display. I just need a way to await the complete loading of the custom geometry, such that an event fires when the geometry is actually ready to display (e.g. when the workers finish loading and pre-processing it all)