Hi Matthew, Gayatri, Srini,
I have made a small sandcastle example that demonstrates the issue in IE11 (about 450MB increase in 24 hrs, Cesium version 1.12), Chrome seems to be OK (or at least much better).
The IE11 memory debugger does not work in the Sandcastle environment, so I’ll have to rework the example to use the memory tool. Given the complexity of Cesium it good be difficult to find the cause…
In my example I constantly zoom to the an entity (a pin) from different heights. I was wondering if the IE11 issue that Srini refers to (deleteTexture leak) has anything to do with zooming.
Thanks, Willem
var timerId;
var heightIdx = 0;
var heights = [10000000, 1000000, 10000, 500]; // camera heights
var viewer = new Cesium.Viewer(‘cesiumContainer’,
{timeline : false, animation : false,
baseLayerPicker: false, fullscreenButton: false,
geocoder: false, infobox: false, navigationHelpButton: false, homeButton: false,
scene3DOnly: true,
sceneModePicker: false, selectionIndicator: false, targetFrameRate: 25});
viewer.scene.globe.tileCacheSize = 10000;
viewer.scene.globe.maximumScreenSpaceError = 1;
viewer.scene.debugShowFramesPerSecond = true;
var pinBuilder = new Cesium.PinBuilder();
var bluePin = viewer.entities.add({
id: 'pin/0',
position : Cesium.Cartesian3.fromDegrees(7.28706166666667, 43.693555),
billboard : {
image : pinBuilder.fromColor(Cesium.Color.ROYALBLUE, 48).toDataURL(),
verticalOrigin : Cesium.VerticalOrigin.BOTTOM
}
});
viewer.zoomTo(viewer.entities);
function doAnimation() {
// console.log('heightIdx ' + heightIdx);
// fly to the pin.
doFly('pin/0', 5.0, 0, -45, heights[heightIdx]);
// next camera height
heightIdx = ++heightIdx % heights.length;
}
function doFly(targetId, flyTimeSeconds, headingDegrees, pitchDegrees, distanceMeters) {
var entity = viewer.entities.getById(targetId);
if (entity) {
var heading = Cesium.Math.toRadians(headingDegrees);
var pitch = Cesium.Math.toRadians(pitchDegrees);
var promise = viewer.flyTo(entity, {
duration: flyTimeSeconds,
offset: new Cesium.HeadingPitchRange(heading, pitch, distanceMeters)
});
promise.then(function (result) {
if (result) {
// ok
}
else {
console.log('promise result false');
}
}).otherwise(function (error) {
console.log('promise error');
});
}
else {
console.log('no entity');
}
}
Sandcastle.addToolbarButton(‘Toggle Animation’, function(){
if (timerId) {
clearInterval(timerId);
timerId = undefined;
console.log('Animation stopped');
}
else {
timerId = setInterval(doAnimation, 10 * 1000);
console.log('Animation started');
}
});