BUG: updateHeights performance issue

Hi @Gabby_Getz !

The merge from couple of weeks ago where Cesium3dTileset’s updateHieghts is somehow modified causes a massive perfomance issue in scenarious where one loads more than 50 tilesets in the scene. I am not sure if this causes any problems with just one tileset, like the Google Earth tileset.

I am still trying to figure out what has happened… main-branch versions from about 1-2 months ago work fast, but this slow down introduced in ~2 wekks.

If we just put return here performance gets fixed:

const scratchUpdateHeightCartographic = new Cartographic();
const scratchUpdateHeightCartographic2 = new Cartographic();
const scratchUpdateHeightCartesian = new Cartesian3();
function processUpdateHeight(tileset, tile, frameState) {
  return; <<--------------------
  const heightCallbackData = tileset._addHeightCallbacks;

Zoom to model to reproduce:

Hi @v12424124_34,

Thanks for the report! This looks like a regression on my part. I’ve gone ahead and opened Fix performance bug with many tilesets by ggetz · Pull Request #11878 · CesiumGS/cesium · GitHub. Would you be able to validate the fix?

1 Like

Yes, this fixes the issue! Thanks for the fast action :slight_smile:

1 Like