Alternatives to CZML for things like borders, reference GIS data

We recently updated to Cesium b21 and found that some fairly large (5+ MB) CZML data files are now locking up Firefox (v.17) for a significant period of time as the CZML is parsed and processed.

One of the larger CZML file contains many, many polylines to outline U.S. state borders. There is no time information associated with this data.

Has anyone else noticed this kind of performance issue when loading large CZML files?

Would the Cesium team recommend against loading this kind of data via CZML? And, if so, would you suggest either an image overlay or some other geo format like GeoJSON to present this sort of reference data?

Thanks for any insight you might have.

  • Chris

I assume you mean b26 and not b21? This is a known issue that we definitely plan on fixing. You can keep an eye on https://github.com/AnalyticalGraphicsInc/cesium/issues/1487 for updates. Because of #1487, we currently have asynchronous set to false, once that issue is fixed we will set it to true and the browser will no longer lock up at all (and I’m sure there’s also plenty of room for optimization in the pipeline itself too.) I assume once it loads it runs great?

The problem is not CZML specific, but is a lower-level problem that affects all geometry (and only geometry, for example, I have a 50 meg CZML of nothing but billboards that loads fast and runs great). Out of curiosity, how much time is a “significant period”? Can you share one of the CZML files you’re using? If so, I can profile and see if anything jumps out that may be specific to your use cases. Overall we’re committed to making this as fast and non-locking as the browser will let us (and hopefully by b27 or b28 at the latest).

Hi Matt,

I was actually referring to b21; the CZML loading was quite poor and we were looking at alternatives (as explained in the original post).

However, we’re now using b25 and the problem has completely disappeared.

It sounds like b26, however, may have introduced some new approach for handling geometries that may be causing similar performance issues to what we experienced?

To answer your question about “significant time”…what we were noticing with b21 loading a 7MB CZML boundary file was locking up a decent workstation for about 60 seconds when loading and unloading the CZML data source.

Hope this helps and thanks for your response.

Sorry, I assumed be b21 was a typo (since we had just released b26).

The performance regression I mentioned is nothing like the one you encountered. I don’t have the same exact CZML file you are using, but a 10 meg file with 11152 polygons and another 11152 polylines outlining takes about 20 seconds to load on a 6 year old desktop (Core 2 Duo E6850 @ 3Ghz). We plan on both making this asynchronous and also threading it so it’s even faster.

I’ll also mention that in b26 once static data like lines and polygons is loaded, it’s GPU bound and performance should be orders of magnitude better than any pre-b26 release of Cesium. Whenever you decide to switch to a post-b25 release, I’d be interested to hear how it affects performance of your app. This was a major refecator of that area of the code, and I still think there’s plenty of room for improvement.

Hi Matt,

Just following up regarding our large CZML polygon dataset and load times.

We’ve recently upgraded to b27 and unfortunately the problem seems worse than b25. That is to say, it might taking roughly the same amount of time to load the boundaries, but in b27 the globe is locking up the browser rather than processing in the background. This is at least my observation. Please let me know how I might take some more definitive measurements to help debug this problem in a way that will assist the Cesium dev team. Would a Chrome WebGL report help?

Thanks.

  • Chris

b28 actually further improves things (takes advantage of multiple cores) and also performs most of the operations asynchronously (there might be some lockup, but not much). I would recommend trying out b28 before doing anything else. We are continuing to improve things related to performance for each release, so any slow examples you can provide would help us better find the hotspots.

Matt,

Wanted to let you know that - after updating to b28 - polyline performance seems much improved. The browser is no longer locking up when loading our 12MB CZML file (of country borders) and the load times appear decreased. Performance of the Cesium WebGL globe after loading the borders does get a bit more sluggish with the CZML file loaded but it’s more responsive than it has been in previous versions.

So, in summary, our problem appears to have been resolved in b28.

Thanks.

You could always just create a new translucent imagery layer that shows country coverage/borders. That's what we use and it loads pretty quick.