<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Maximum Number of Graphics in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/maximum-number-of-graphics/m-p/373165#M2480</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Are u adding these Graphics in a AsyncTask?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Apr 2013 06:44:24 GMT</pubDate>
    <dc:creator>KevinGebhardt</dc:creator>
    <dc:date>2013-04-23T06:44:24Z</dc:date>
    <item>
      <title>Maximum Number of Graphics</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/maximum-number-of-graphics/m-p/373164#M2479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is there some kind of approximate maximum number of graphics that can be added to a GraphicsLayer?&amp;nbsp; I am adding one SimpleLineSymbol to my GraphicsLayer about every 50ms or so.&amp;nbsp; My application will run fine and then eventually it just freezes and returns the "application not responding" dialog.&amp;nbsp; It usually happens after about 400 or 500 lines have been added, but that number varies.&amp;nbsp; I get no feedback in Logcat or anywhere else and was just wondering if this could be because I am adding too much data.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Apr 2013 20:56:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/maximum-number-of-graphics/m-p/373164#M2479</guid>
      <dc:creator>JeanLitzebauer</dc:creator>
      <dc:date>2013-04-03T20:56:59Z</dc:date>
    </item>
    <item>
      <title>Re: Maximum Number of Graphics</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/maximum-number-of-graphics/m-p/373165#M2480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Are u adding these Graphics in a AsyncTask?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Apr 2013 06:44:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/maximum-number-of-graphics/m-p/373165#M2480</guid>
      <dc:creator>KevinGebhardt</dc:creator>
      <dc:date>2013-04-23T06:44:24Z</dc:date>
    </item>
    <item>
      <title>Re: Maximum Number of Graphics</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/maximum-number-of-graphics/m-p/373166#M2481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The limitations on adding graphics is related to the memory available on your device.&amp;nbsp; Here is some code to find out how much memory your app is using.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
double totalMemoryUsed = (Runtime.getRuntime().totalMemory() + android.os.Debug.getNativeHeapAllocatedSize());
int percentUsed = (int)(totalMemoryUsed / Runtime.getRuntime().maxMemory() * 100);
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I suggest you check the value of &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;percentUsed&lt;/SPAN&gt;&lt;SPAN&gt; after you add each graphic.&amp;nbsp; The percentage should be consistent when your app stops responding and that would be the limitation on your device.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 17:15:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/maximum-number-of-graphics/m-p/373166#M2481</guid>
      <dc:creator>DanO_Neill</dc:creator>
      <dc:date>2021-12-11T17:15:15Z</dc:date>
    </item>
    <item>
      <title>Re: Maximum Number of Graphics</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/maximum-number-of-graphics/m-p/373167#M2482</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am seeing the same behavior after approximately 400 vertices added to graphic where things start to lag.&amp;nbsp; At around 600-700 vertices the application freezes.&amp;nbsp; This is running the following code within an Asynchronous Timer class.&amp;nbsp; Any ideas on workarounds?&amp;nbsp;&amp;nbsp; From the ESRI samples it seems like you need to add in an entirely new graphic on each refresh and then remove the old one.&amp;nbsp; Is there no way to just draw the new portion of the graphic to save memory?&amp;nbsp; If not wondering if there is a workaround to "flush the graphic every so many vertices?&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;private void addGeometry(Point point) {&lt;/P&gt;&lt;P&gt;&amp;nbsp; FeatureInformation pFeatureInformation = FeatureInformation.getInstance();&lt;/P&gt;&lt;P&gt;&amp;nbsp; if (pFeatureInformation.getEditMode() != FeatureInformation.EditMode.NONE) {&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; pFeatureInformation.mPoints.add(point);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Integer oldGraphic = graphicID;&lt;/P&gt;&lt;P&gt;&amp;nbsp; //workingLayer.removeAll();&lt;/P&gt;&lt;P&gt;&amp;nbsp; if (pFeatureInformation.getEditMode() == FeatureInformation.EditMode.POINT) {&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Graphic graphic = new Graphic(point, pointSymbol);&lt;/P&gt;&lt;P&gt;&amp;nbsp; graphicID = workingLayer.addGraphic(graphic);&lt;/P&gt;&lt;P&gt;&amp;nbsp; activeGeometry = point;&lt;/P&gt;&lt;P&gt;&amp;nbsp; } else if (pFeatureInformation.getEditMode() == FeatureInformation.EditMode.POLYLINE) {&lt;/P&gt;&lt;P&gt;&amp;nbsp; // **for vertex recognition&lt;/P&gt;&lt;P&gt;&amp;nbsp; Graphic pointGraphic = new Graphic(pFeatureInformation.mPoints.get(0), pointSymbol);&lt;/P&gt;&lt;P&gt;&amp;nbsp; graphicID = workingLayer.addGraphic(pointGraphic);&lt;/P&gt;&lt;P&gt;&amp;nbsp; //&lt;/P&gt;&lt;P&gt;&amp;nbsp; MultiPath multipath = new Polyline();&lt;/P&gt;&lt;P&gt;&amp;nbsp; multipath.startPath(pFeatureInformation.mPoints.get(0));&lt;/P&gt;&lt;P&gt;&amp;nbsp; for (int i = 1; i &amp;lt; pFeatureInformation.mPoints.size(); i++) {&lt;/P&gt;&lt;P&gt;&amp;nbsp; multipath.lineTo(pFeatureInformation.mPoints.get(i));&lt;/P&gt;&lt;P&gt;&amp;nbsp; // for vertex recognition&lt;/P&gt;&lt;P&gt;&amp;nbsp; Graphic pointGraphic2 = new Graphic(pFeatureInformation.mPoints.get(i), pointSymbol);&lt;/P&gt;&lt;P&gt;&amp;nbsp; graphicID = workingLayer.addGraphic(pointGraphic2);&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; Graphic graphic = new Graphic(multipath, lineSymbol);&lt;/P&gt;&lt;P&gt;&amp;nbsp; graphicID = workingLayer.addGraphic(graphic);&lt;/P&gt;&lt;P&gt;&amp;nbsp; activeGeometry = multipath;&lt;/P&gt;&lt;P&gt;&amp;nbsp; } else if (pFeatureInformation.getEditMode() == FeatureInformation.EditMode.POLYGON) {&lt;/P&gt;&lt;P&gt;&amp;nbsp; // **for vertex recognition&lt;/P&gt;&lt;P&gt;&amp;nbsp; Graphic pointGraphic = new Graphic(&lt;/P&gt;&lt;P&gt;&amp;nbsp; pFeatureInformation.mPoints.get(0), pointSymbol);&lt;/P&gt;&lt;P&gt;&amp;nbsp; graphicID = workingLayer.addGraphic(pointGraphic);&lt;/P&gt;&lt;P&gt;&amp;nbsp; //&lt;/P&gt;&lt;P&gt;&amp;nbsp; MultiPath multipath = new Polygon();&lt;/P&gt;&lt;P&gt;&amp;nbsp; multipath.startPath(pFeatureInformation.mPoints.get(0));&lt;/P&gt;&lt;P&gt;&amp;nbsp; for (int i = 1; i &amp;lt; pFeatureInformation.mPoints.size(); i++) {&lt;/P&gt;&lt;P&gt;&amp;nbsp; multipath.lineTo(pFeatureInformation.mPoints.get(i));&lt;/P&gt;&lt;P&gt;&amp;nbsp; // for vertex recognition&lt;/P&gt;&lt;P&gt;&amp;nbsp; Graphic pointGraphic2 = new Graphic(pFeatureInformation.mPoints.get(i), pointSymbol);&lt;/P&gt;&lt;P&gt;&amp;nbsp; graphicID = workingLayer.addGraphic(pointGraphic2);&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; Graphic graphic = new Graphic(multipath, polygonSymbol);&lt;/P&gt;&lt;P&gt;&amp;nbsp; graphicID = workingLayer.addGraphic(graphic);&lt;/P&gt;&lt;P&gt;&amp;nbsp; activeGeometry = multipath;&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; try {&lt;/P&gt;&lt;P&gt;&amp;nbsp; workingLayer.removeGraphic(oldGraphic);&lt;/P&gt;&lt;P&gt;&amp;nbsp; } catch (Exception e) {&lt;/P&gt;&lt;P&gt;&amp;nbsp; // TODO: handle exception&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2015 23:31:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/maximum-number-of-graphics/m-p/373167#M2482</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2015-07-14T23:31:39Z</dc:date>
    </item>
    <item>
      <title>Re: Maximum Number of Graphics</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/maximum-number-of-graphics/m-p/373168#M2483</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK an update to this.&amp;nbsp; We did find that by not showing vertex graphics, that memory usage is now greatly reduced.&amp;nbsp; We are now able to do around 3000 vertices on a streaming line before we notice any slow down.&amp;nbsp; Still think having to re-draw the entire graphic as the SDK forces you to do is inefficient and will eventually cause almost any device to slow down.&amp;nbsp; However 3000 vertices seems vary reasonable as most folks will not collect features this large and we will advise setting interval to higher time for large features.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jul 2015 18:14:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/maximum-number-of-graphics/m-p/373168#M2483</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2015-07-27T18:14:13Z</dc:date>
    </item>
    <item>
      <title>Re: Maximum Number of Graphics</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/maximum-number-of-graphics/m-p/373169#M2484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What mode are you using for your GraphicsLayer? &lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/android/api-reference/reference/com/esri/android/map/GraphicsLayer.RenderingMode.html" title="https://developers.arcgis.com/android/api-reference/reference/com/esri/android/map/GraphicsLayer.RenderingMode.html"&gt;GraphicsLayer.RenderingMode | ArcGIS Android 10.2.6 API&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This greatly affects memory usage and performance. It does also mean the user experience is slightly different, but static mode might solve your problem. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jul 2015 19:21:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/maximum-number-of-graphics/m-p/373169#M2484</guid>
      <dc:creator>WillCrick</dc:creator>
      <dc:date>2015-07-30T19:21:21Z</dc:date>
    </item>
  </channel>
</rss>

