1. A concise explanation of the problem you're experiencing.
Too much CPU is being used when running an animation. I am looking for a way to minimize CPU usage.
I am currently using the basic viewer with the basic animation example found in the docs (see code example below). I have additionally set the viewer's requestRenderMode flag to true to conserve CPU when the display is idle.
When the display is idle, the CPU usage is under 3%. When the animation is running, CPU usage is up to 100%, averaging between 80% and 90%. I am measuring the CPU usage with Firefox's about:performance. I set up this example using Angular via the Cesium blog.
2. A minimal code example. If you've found a bug, this helps us reproduce and repair it.
ngOnInit() {
const viewer = new Cesium.Viewer(this.el.nativeElement, {
requestRenderMode: true
});
var clock = new Cesium.Clock();
var clockViewModel = new Cesium.ClockViewModel(clock);
var viewModel = new Cesium.AnimationViewModel(clockViewModel);
var widget = new Cesium.Animation('animationContainer', viewModel);
function tick() {
clock.tick();
Cesium.requestAnimationFrame(tick);
}
Cesium.requestAnimationFrame(tick);
}
3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
I need to do this because I am working on an Angular dashboard with multiple widgets, one of which will be a cesium display. This display should constantly be showing a simple animation. It severely bogs down the dashboard's performance.
4. The Cesium version you're using, your operating system and browser.
Cesium version: 1.48.0
OS: Ubuntu 18.04
Browser: Firefox 61.0.1