continuously increase memory when add large amount of graphic layer in ArcGIS Map in iOS Swift.

852
1
12-02-2019 04:13 AM
KishanSuthar
New Contributor

We have added 2K to 300K location marker in ArcGIS Map application memory goes high and terminate due to memory.

in ArcGIS Map, we get data about 2K to 300K and set and remove data on a particular zoom level. In this process we get N element and using for loop create N  element  AGSSymbol then it add on AGSGraphic Array.

After the large process [AGSGraphic] into the AGSGraphicsOverlay. then it adds on ArcGIS Map.

this process is repeated when certain zoom in or zoom out and Memory increase continuously.

so how can solve this issue of memory usage ??  Nicholas FurnessDivesh Goyal

0 Kudos
1 Reply
Nicholas-Furness
Esri Regular Contributor

300,000 markers seems like quite a lot and at a certain point you might find that device memory simply isn't enough.

Some possible optimizations:

When you have that much data, it is usually unnecessary to have it all loaded at once (it's either partially off the visible map area, or else if it's all being displayed it's unreadable or better represented in some processed way):

  • Do you need to have 300,000 markers at a time? That's a very "busy" map and you won't be able to see them all at once. Perhaps consider clustering the data, or aggregating it into something more suitable for display (e.g. polygons). You could look at clusterlayer-plugin-ios (in particular the runtime-100 branch, which is still under development but pretty close to finished).
  • Have you considered keeping this data in a Feature Service (or a local Geodatabase)? Runtime would then only retrieve and bring into memory the markers that it needs for display.