<?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 Arcade - troubleshooting slow popup in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcade-troubleshooting-slow-popup/m-p/636642#M59496</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good morning. I'm troubleshooting a slow webmap popup request. The popup is occurring on a feature layer. Each time the pointer is clicked, this particular layer spawns 4 different http requests, which appears to be the cause of the delay. Anyone know more about this and how arcade impacts these requests? I have an arcade expression, that does a simple intersect lookup, but I'm seeing a lot of repeat requests.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The arcade looks like this:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;```&lt;BR /&gt;var neighborhoods = Intersects($feature, FeatureSetByName($datastore,"Neighborhoods"));&lt;BR /&gt;return First(neighborhoods)['name'];&lt;BR /&gt;```&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the requests I'm seeing in the browser EVERY click are:&lt;BR /&gt;1. `.../MapServer?f=json` (root map server)&lt;BR /&gt;2. `.../MapServer/9/query?f=json&amp;amp;objectIds....etc` (this is the identify layer)&lt;BR /&gt;3. `.../MapServer/11?f=json` (this is the intersecting layer - repeated request)&lt;BR /&gt;4. .../MapServer/11/query?f=json&amp;amp;geometry...etc`&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess my questions are, why do 1 and 3 have to occur every time? These are completely duplicated requests. Also, in this particular web app, I'm using feature layers and layer views in 4.x, couldn't these be queried instead of the rest endpoint to achieve a more performant query result?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm already doing this, but arcade appears to be querying the endpoint anyways and I'm not sure if there's a workaround.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Apr 2019 12:15:05 GMT</pubDate>
    <dc:creator>roemhildtg</dc:creator>
    <dc:date>2019-04-01T12:15:05Z</dc:date>
    <item>
      <title>Arcade - troubleshooting slow popup</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcade-troubleshooting-slow-popup/m-p/636642#M59496</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good morning. I'm troubleshooting a slow webmap popup request. The popup is occurring on a feature layer. Each time the pointer is clicked, this particular layer spawns 4 different http requests, which appears to be the cause of the delay. Anyone know more about this and how arcade impacts these requests? I have an arcade expression, that does a simple intersect lookup, but I'm seeing a lot of repeat requests.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The arcade looks like this:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;```&lt;BR /&gt;var neighborhoods = Intersects($feature, FeatureSetByName($datastore,"Neighborhoods"));&lt;BR /&gt;return First(neighborhoods)['name'];&lt;BR /&gt;```&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the requests I'm seeing in the browser EVERY click are:&lt;BR /&gt;1. `.../MapServer?f=json` (root map server)&lt;BR /&gt;2. `.../MapServer/9/query?f=json&amp;amp;objectIds....etc` (this is the identify layer)&lt;BR /&gt;3. `.../MapServer/11?f=json` (this is the intersecting layer - repeated request)&lt;BR /&gt;4. .../MapServer/11/query?f=json&amp;amp;geometry...etc`&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess my questions are, why do 1 and 3 have to occur every time? These are completely duplicated requests. Also, in this particular web app, I'm using feature layers and layer views in 4.x, couldn't these be queried instead of the rest endpoint to achieve a more performant query result?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm already doing this, but arcade appears to be querying the endpoint anyways and I'm not sure if there's a workaround.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Apr 2019 12:15:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcade-troubleshooting-slow-popup/m-p/636642#M59496</guid>
      <dc:creator>roemhildtg</dc:creator>
      <dc:date>2019-04-01T12:15:05Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade - troubleshooting slow popup</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcade-troubleshooting-slow-popup/m-p/636643#M59497</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As far as I understand from the blog by Paul Barker (see link below), you should try to nest statements to reduce the REST calls (which up to some extend you are already doing):&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/whats-new-with-arcade-taking-a-stroll-through-featuresets-part-2/"&gt;https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/whats-new-with-arcade-taking-a-stroll-through-featuresets-part-2/&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-javascript line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;First&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Intersects&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$feature&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;FeatureSetByName&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$datastore&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Neighborhoods"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'name'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Apr 2019 20:24:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcade-troubleshooting-slow-popup/m-p/636643#M59497</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2019-04-01T20:24:42Z</dc:date>
    </item>
  </channel>
</rss>

