Performance issue to do animation on map with ArcGIS JS API version 4.12

12-23-2019 09:29 PM
New Contributor III


We are using ArcGIS JS API 4.12, and we are trying to draw animation for several vehicles according to their latest GPS coordinates. We used version 3 and just converted to 4, expecting it would have much improvement on performance since it is using canvas rather than SVG. However, the fact is that, the performance seems to be worse. We are seeing enormous memory increment especially on two situations:


1). re-rendering on map for animation (simulate vehicle movement);

- Currently, we are using GraphicsLayer. For animation, we do a clone for the graphic and re-add it to layer. Is there a better solution for this? 

2). zoom in/out on map;

- We doubt that the API is storing a lot of cache in memory when the map extent changes, is there any way/configuration that we can reduce the memory consumption. Currently it could go up to 1 ~ 2 GB easily just pan/zoom on the map.

Please let us know if you encounter the same issue or have any thought about these.



2 Replies
Esri Regular Contributor

For situation #1, you can update the geometry of the existing Graphic; there's no need to remove, clone, and re-add it.

New Contributor III

Thanks for your reply. It sounds a promising way. I am going to try this and see how it works.

0 Kudos