1. A concise explanation of the problem you're experiencing.
I am adding entities with a Path to display trajectories. When I just have a few entities, the performance is ok. When I add a lot, performance is significantly reduced so that even rotating the camera and zooming is very slow and choppy. Data size is 50-200 separate paths, for a total of around 60k data points (total, not per path). I have not had any success playing with the path resolution, even when I set it far beyond the time step of my data. I have verified that when I turn off the paths, it runs smooth as silk.
From what I can tell, the PolylineUpdater.updateObject() function is being called continually, even when I'm not adding data, updating the clock, etc. Is that by design, and is there a way to control this so that it only tries to update if needed?
Is there anything else I can do to try to improve/optimize performance?
2. A minimal code example. If you've found a bug, this helps us reproduce and repair it.
var entity = viewer.entities.add({
id: 'someId',
name: 'myEntity',
billboard: {
image: ".../whiteShapes.png",
imageSubregion: boundingRectangle,
color: color,
scaleByDistance: nearFarScale,
eyeOffset: offset
},
path: {
material: pathColor,
width: 2,
leadTime: 0
}
});
var position = new Cesium.SampledPositionProperty();
var orientation = new Cesium.SampledProperty(Cesium.Quaternion);
position.forwardExtrapolationType = Cesium.ExtrapolationType.HOLD;
orientation.forwardExtrapolationType = Cesium.ExtrapolationType.HOLD;
// I add position/orientation by repeatedly adding samples:
position.addSample(time, pos);
orientation.addSample(time, orient);
entity.position = position;
entity.orientation = orientation;
entity.availability = new Cesium.TimeIntervalCollection([interval]);
3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
I need to display the paths that entities have traveled.
4. The Cesium version you're using, your operating system and browser.
Cesium 1.30, CentOS 6.7, Firefox 45.1.0 (yes I know, old old old)
Thanks for your help!
-Steven