<?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: AGSFeatureLayer.selectFeatures is very slow for point selection in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsfeaturelayer-selectfeatures-is-very-slow-for/m-p/159986#M1473</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's looking like this might be a difficult one to reproduce. The layer is internal data on ArcGIS Enterprise, and when I used an official Esri layer I couldn't recreate the problem (both single and multiple selected in 2-3 seconds). If I get more info I'll follow up.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Jul 2019 20:54:58 GMT</pubDate>
    <dc:creator>SteveMiller4</dc:creator>
    <dc:date>2019-07-17T20:54:58Z</dc:date>
    <item>
      <title>AGSFeatureLayer.selectFeatures is very slow for point selection</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsfeaturelayer-selectfeatures-is-very-slow-for/m-p/159980#M1467</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to select polygons based on where the user clicks.&amp;nbsp;In order to do that I have&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let mapPointQuery = AGSQueryParameters()&lt;BR /&gt; mapPointQuery.geometry = mapPoint&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This eventually works, but is EXTREMELY slow. When I pass in a rectangle for the geometry it is able to select a dozen or so polygons in ~2 seconds, but when I pass in a point it takes ~13 seconds to select a single polygon. It's roughly the same no matter what spatialRelationship I choose. I've tried a few alternative that haven't worked very well:&lt;/P&gt;&lt;P&gt;- The identifyLayers function is faster, but I need to be able to&amp;nbsp;pass in a whereClause query and selection mode&lt;/P&gt;&lt;P&gt;- expanding the point into a small&amp;nbsp;envelope works ok, but it almost always selects multiple polygons and I really want to only select a single one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there some way to speed things up so that point select and rectangle select perform similarly? It seems like the huge difference in performance points to something that can be optimized on the ArcGIS side.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jul 2019 22:16:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsfeaturelayer-selectfeatures-is-very-slow-for/m-p/159980#M1467</guid>
      <dc:creator>SteveMiller4</dc:creator>
      <dc:date>2019-07-15T22:16:49Z</dc:date>
    </item>
    <item>
      <title>Re: AGSFeatureLayer.selectFeatures is very slow for point selection</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsfeaturelayer-selectfeatures-is-very-slow-for/m-p/159981#M1468</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is this when querying against a hosted polygon feature layer in ArcGIS Online or some polygon layer in Enterprise?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jul 2019 22:27:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsfeaturelayer-selectfeatures-is-very-slow-for/m-p/159981#M1468</guid>
      <dc:creator>Nicholas-Furness</dc:creator>
      <dc:date>2019-07-15T22:27:06Z</dc:date>
    </item>
    <item>
      <title>Re: AGSFeatureLayer.selectFeatures is very slow for point selection</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsfeaturelayer-selectfeatures-is-very-slow-for/m-p/159982#M1469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Both the 2 second and the 13 second selections are on a polygon layer in Enterprise, via the iOS SDK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jul 2019 23:14:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsfeaturelayer-selectfeatures-is-very-slow-for/m-p/159982#M1469</guid>
      <dc:creator>SteveMiller4</dc:creator>
      <dc:date>2019-07-15T23:14:07Z</dc:date>
    </item>
    <item>
      <title>Re: AGSFeatureLayer.selectFeatures is very slow for point selection</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsfeaturelayer-selectfeatures-is-very-slow-for/m-p/159983#M1470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's a bit of a long shot, but I wonder if your spatial indexes need updating on the backing datastore? I would expect both point and rectangle to perform about the same, at least on the timescales you're talking about. One suggestion would be to connect to the backing dataset in Pro or ArcMap and see if you see similarly poor performance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jul 2019 23:47:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsfeaturelayer-selectfeatures-is-very-slow-for/m-p/159983#M1470</guid>
      <dc:creator>Nicholas-Furness</dc:creator>
      <dc:date>2019-07-15T23:47:42Z</dc:date>
    </item>
    <item>
      <title>Re: AGSFeatureLayer.selectFeatures is very slow for point selection</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsfeaturelayer-selectfeatures-is-very-slow-for/m-p/159984#M1471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's fast when selecting a single polygon using the Web Map or the Collector App, and when selecting multiple polygons in the SDK. It's only when selecting a single polygon using selectFeatures in the SDK that it's slow.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jul 2019 15:11:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsfeaturelayer-selectfeatures-is-very-slow-for/m-p/159984#M1471</guid>
      <dc:creator>SteveMiller4</dc:creator>
      <dc:date>2019-07-16T15:11:43Z</dc:date>
    </item>
    <item>
      <title>Re: AGSFeatureLayer.selectFeatures is very slow for point selection</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsfeaturelayer-selectfeatures-is-very-slow-for/m-p/159985#M1472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, let's back up a bit then. There's some new information there. What's confusing is that it is faster with a polygon geometry on the AGSQueryParameters than with a point. But then with both the Map Viewer and with Collector, it's fast.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you share the layer with me over DM? I'd like to try to repro this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jul 2019 01:16:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsfeaturelayer-selectfeatures-is-very-slow-for/m-p/159985#M1472</guid>
      <dc:creator>Nicholas-Furness</dc:creator>
      <dc:date>2019-07-17T01:16:56Z</dc:date>
    </item>
    <item>
      <title>Re: AGSFeatureLayer.selectFeatures is very slow for point selection</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsfeaturelayer-selectfeatures-is-very-slow-for/m-p/159986#M1473</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's looking like this might be a difficult one to reproduce. The layer is internal data on ArcGIS Enterprise, and when I used an official Esri layer I couldn't recreate the problem (both single and multiple selected in 2-3 seconds). If I get more info I'll follow up.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jul 2019 20:54:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsfeaturelayer-selectfeatures-is-very-slow-for/m-p/159986#M1473</guid>
      <dc:creator>SteveMiller4</dc:creator>
      <dc:date>2019-07-17T20:54:58Z</dc:date>
    </item>
    <item>
      <title>Re: AGSFeatureLayer.selectFeatures is very slow for point selection</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsfeaturelayer-selectfeatures-is-very-slow-for/m-p/159987#M1474</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks. The reason I suggested checking the spatial indexes&amp;nbsp;is because you initially said you were only having trouble when selecting by point rather than by polygon. I've seen spatial queries using a point&amp;nbsp;cause issues with outdated indexes (albeit a long time ago) when compared with the same query using an envelope/polygon.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it seems more complicated than that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What you could do is inspect the REST call made by the ArcGIS Online Map&amp;nbsp;Viewer, and inspect the call made by the &lt;A href="https://developers.arcgis.com/ios/latest/api-reference/interface_a_g_s_feature_table.html#a43d152517c6ee3fa582d2f741367b7bb"&gt;&lt;STRONG&gt;AGSServiceFeatureTable.query()&lt;/STRONG&gt;&lt;/A&gt; and compare them. To see the Runtime call, set &lt;A href="https://developers.arcgis.com/ios/latest/api-reference/interface_a_g_s_request_configuration.html#acfb42eca3a24250608085a568e256f85"&gt;&lt;STRONG&gt;AGSRequestConfiguration.global().debugLogRequests&lt;/STRONG&gt;&lt;/A&gt; to true (you could also set &lt;A href="https://developers.arcgis.com/ios/latest/api-reference/interface_a_g_s_request_configuration.html#a8533fcff312dd250b4bdcfb43320fa7c"&gt;&lt;STRONG&gt;debugLogResponses&lt;/STRONG&gt;&lt;/A&gt;), and you'll see output in the console.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It would be interesting to see if the slowness is in the reply from the &lt;A href="https://developers.arcgis.com/ios/latest/api-reference/interface_a_g_s_feature_table.html#a43d152517c6ee3fa582d2f741367b7bb"&gt;&lt;STRONG&gt;query()&lt;/STRONG&gt;&lt;/A&gt;, or in the visual update from the &lt;A href="https://developers.arcgis.com/ios/latest/api-reference/interface_a_g_s_feature_layer.html#aea568b5f86ade5a225806083c7cfbacb"&gt;&lt;STRONG&gt;selectFeature()&lt;/STRONG&gt;&lt;/A&gt; call.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or are&amp;nbsp;you calling &lt;A href="https://developers.arcgis.com/ios/latest/api-reference/interface_a_g_s_feature_layer.html#ae655af6edce13c49c841f0556dc6d561"&gt;&lt;STRONG&gt;selectFeaturesWithQuery()&lt;/STRONG&gt;&lt;/A&gt;?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jul 2019 21:04:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsfeaturelayer-selectfeatures-is-very-slow-for/m-p/159987#M1474</guid>
      <dc:creator>Nicholas-Furness</dc:creator>
      <dc:date>2019-07-17T21:04:30Z</dc:date>
    </item>
    <item>
      <title>Re: AGSFeatureLayer.selectFeatures is very slow for point selection</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsfeaturelayer-selectfeatures-is-very-slow-for/m-p/159988#M1475</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It turned out the problem was that I put&lt;/P&gt;&lt;P&gt;mapPointQuery.maxFeatures = 1&lt;/P&gt;&lt;P&gt;in my query. I thought it would make the selection&amp;nbsp;faster by having it return as soon as it found a matching feature, but it actually made it much slower.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jul 2019 13:14:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsfeaturelayer-selectfeatures-is-very-slow-for/m-p/159988#M1475</guid>
      <dc:creator>SteveMiller4</dc:creator>
      <dc:date>2019-07-26T13:14:43Z</dc:date>
    </item>
  </channel>
</rss>

