Billboard clamped to ground slow with fat terrain


I am adding 20k clamped POIs to the globe (Cesium 1.72).
It is almost instantaneous when using Cesium Ion terrain but with a custom terrain it takes minutes.
See (instructions are at the top of the JS file).

I noticed there are much more triangles (x5 in terrain size) but the waiting time is so much longer…

The profiler shows that a lot of time in spent in the Billboard._updateClamping / Globe.getHeight function when adding the billboards to the globe.

I am wondering:

  • why there is such a big difference between Cesium Ion terrain and the custom terrain;
  • why it only happens when adding the POIs to the globe and not later on when navigating;
  • if there is something I could do to workaround the issue.

Thanks in advance for your inputs.

See related issue