Removing data sources with many entities seems to be significantly slower in the recent release

In the most recent Cesium version, it looks like removing a data source containing tens of thousands of points is slower compared to older releases.

Here is a sandcastle link.The linked example creates 40,000 points in a dataSource and removes them all when you click the “Remove DataSource” button at the top of the example. It then prints the time taken in seconds to the console.

Time taken in 1.68 to remove data source:
~7 seconds

Time taken in my local copy of 1.43:
~1-2 seconds

Our application recently upgraded to 1.66 and we’re seeing the same regression there as well.

Is there anything I can do to speed up the removal of these data sources? Is this a known regression? I’d appreciate a way to get the performance back to where it was in the older releases.

I can’t show a sandcastle example of the speed in 1.43 because I’m not sure how to open sandcastle in a previous release (you used to be able to go to the downloads page to open sandcastle from old releases, but that link seems to be gone). If anyone can tell me how to open sandcastle from a previous release that would also be very helpful.

Hi @Abhi_Sundu,

Thanks for the report, it helps to know the version range in which the behavior changed to help track any potential bugs down.

In the meantime, I did notice it’s much more performant to skip removing all the entities from the datasource and instead just remove the data source itself.

Thanks,
Gabby

Also just to close the loop, the issue was discussed and ultimately closed in Removing data sources with many entities seems to be significantly slower in the recent release · Issue #8767 · CesiumGS/cesium · GitHub.