# When I using 10 “Cesium.CustomDataSource” s , it become slow

**URL:** <https://community.cesium.com/t/when-i-using-10-cesium-customdatasource-s-it-become-slow/18812>\
**Category:** CesiumJS\
**Created:** [May 27, 2022, 3:30pm UTC](https://community.cesium.com/t/when-i-using-10-cesium-customdatasource-s-it-become-slow/18812 "2022-05-27T15:30:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mwhei](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/mwhei/32/3458_2.png) [@mwhei](https://community.cesium.com/u/mwhei)\
**Post date:** [May 27, 2022, 3:30pm UTC](https://community.cesium.com/t/when-i-using-10-cesium-customdatasource-s-it-become-slow/18812/1 "2022-05-27T15:30:36Z")

</div>

When I using 10 “Cesium.CustomDataSource” s , dragging the map becomes slow.

Anybody give any suggestions, I will be appreciate.

---

<div class="post-metadata">

**Author:** ![Scott\_Reynolds](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/scott_reynolds/32/2014_2.png) [@Scott\_Reynolds](https://community.cesium.com/u/Scott_Reynolds)\
**Post date:** [May 31, 2022, 1:05pm UTC](https://community.cesium.com/t/when-i-using-10-cesium-customdatasource-s-it-become-slow/18812/2 "2022-05-31T13:05:38Z")

</div>

It sounds like there might be lots of entities in the CustomDataSources. A couple of things you might try while the drag is taking place:

1. Enable clustering on the data sources.
2. Disable the showing each of the data sources and show a bounding box in their place.

---

<div class="post-metadata">

**Author:** ![mwhei](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/mwhei/32/3458_2.png) [@mwhei](https://community.cesium.com/u/mwhei)\
**Post date:** [June 2, 2022, 3:32am UTC](https://community.cesium.com/t/when-i-using-10-cesium-customdatasource-s-it-become-slow/18812/3 "2022-06-02T03:32:16Z")

</div>

Thank you. I know how to set the custtomdatasource ‘s show = false. But I don’t know that " 1. Disable the showing each of the data sources and show a bounding box in their place.’, how to “show a bounding box in their place” for a customdatasource?

---

<div class="post-metadata">

**Author:** ![Scott\_Reynolds](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/scott_reynolds/32/2014_2.png) [@Scott\_Reynolds](https://community.cesium.com/u/Scott_Reynolds)\
**Post date:** [June 2, 2022, 12:21pm UTC](https://community.cesium.com/t/when-i-using-10-cesium-customdatasource-s-it-become-slow/18812/4 "2022-06-02T12:21:47Z")

</div>

You would need to iterate over the [Entity](https://cesium.com/learn/cesiumjs/ref-doc/Entity.html)s in the [CustomDataSource](https://cesium.com/learn/cesiumjs/ref-doc/CustomDataSource.html)’s entityCollection to extract their cartographic position at the current time and use that to expand a [BoundingRectangle](https://cesium.com/learn/cesiumjs/ref-doc/BoundingRectangle.html) created for this purpose. Drawing the resulting rectangle should be straightforward.
