<?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 Intersects really slow to load in dashboard in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/arcade-intersects-really-slow-to-load-in-dashboard/m-p/1209214#M47691</link>
    <description>&lt;P&gt;I've had this issue with a couple of different datasets now - if I try and use an Intersects function in a dashboard, it takes over 5 minutes for the dashboard widgets to load, which obviously makes it unusable for the end user.&lt;/P&gt;&lt;P&gt;Below is an example of the Arcade expression I have used for a table widget. The zone featureset has just 2 features, and the s_features featureset has 1500, so a decent amount but not huge. Both are polygon datasets.&lt;/P&gt;&lt;P&gt;Any suggestions of alternative methods I could use to make this quicker?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// Get the datasets
var zone = FeatureSetByPortalItem(Portal('https://arcgis.com'),'&amp;lt;id_hidden&amp;gt;', 0, ['zone'], true)
 
var s_features = FeatureSetByPortalItem(Portal('https://arcgis.com'),'&amp;lt;id_hidden&amp;gt;', 1, ['HA'], true)
 
// Create new empty feature set
var new_fs = {
    'fields': [{'name': 'Zone', 'type': 'esriFieldTypeString'},
    {'name': 'Number', 'type': 'esriFieldTypeInteger'}],
    'geometryType': '',
    'features': []
}
 
// Tell it what will be contained in each field
for (var z in zone) {
    var intersectArea = Intersects(s_features, z);
    var countS = count(intersectArea);
    var new_zone = z['zone']
    Push(new_fs.features, {'attributes': {'Zone': new_zone, 'Number': countS}})
}

// Create new feature set
var zone_count = FeatureSet(Text(new_fs))

return zone_count&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 02 Sep 2022 16:23:37 GMT</pubDate>
    <dc:creator>DebHSF</dc:creator>
    <dc:date>2022-09-02T16:23:37Z</dc:date>
    <item>
      <title>Arcade Intersects really slow to load in dashboard</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-intersects-really-slow-to-load-in-dashboard/m-p/1209214#M47691</link>
      <description>&lt;P&gt;I've had this issue with a couple of different datasets now - if I try and use an Intersects function in a dashboard, it takes over 5 minutes for the dashboard widgets to load, which obviously makes it unusable for the end user.&lt;/P&gt;&lt;P&gt;Below is an example of the Arcade expression I have used for a table widget. The zone featureset has just 2 features, and the s_features featureset has 1500, so a decent amount but not huge. Both are polygon datasets.&lt;/P&gt;&lt;P&gt;Any suggestions of alternative methods I could use to make this quicker?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// Get the datasets
var zone = FeatureSetByPortalItem(Portal('https://arcgis.com'),'&amp;lt;id_hidden&amp;gt;', 0, ['zone'], true)
 
var s_features = FeatureSetByPortalItem(Portal('https://arcgis.com'),'&amp;lt;id_hidden&amp;gt;', 1, ['HA'], true)
 
// Create new empty feature set
var new_fs = {
    'fields': [{'name': 'Zone', 'type': 'esriFieldTypeString'},
    {'name': 'Number', 'type': 'esriFieldTypeInteger'}],
    'geometryType': '',
    'features': []
}
 
// Tell it what will be contained in each field
for (var z in zone) {
    var intersectArea = Intersects(s_features, z);
    var countS = count(intersectArea);
    var new_zone = z['zone']
    Push(new_fs.features, {'attributes': {'Zone': new_zone, 'Number': countS}})
}

// Create new feature set
var zone_count = FeatureSet(Text(new_fs))

return zone_count&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Sep 2022 16:23:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-intersects-really-slow-to-load-in-dashboard/m-p/1209214#M47691</guid>
      <dc:creator>DebHSF</dc:creator>
      <dc:date>2022-09-02T16:23:37Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Intersects really slow to load in dashboard</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-intersects-really-slow-to-load-in-dashboard/m-p/1209292#M47698</link>
      <description>&lt;P&gt;Can you run a geoprocess on a regular interval to create this data instead of using a runtime Arcade expression?&amp;nbsp; This might greatly reduce the load time.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Sep 2022 18:42:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-intersects-really-slow-to-load-in-dashboard/m-p/1209292#M47698</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2022-09-02T18:42:17Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Intersects really slow to load in dashboard</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-intersects-really-slow-to-load-in-dashboard/m-p/1209633#M47718</link>
      <description>&lt;P&gt;Thanks, yes that's the next option if I can't speed up the Arcade. It's a regularly updated dataset so was hoping to avoid a manual process or auto-run script.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Sep 2022 08:23:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-intersects-really-slow-to-load-in-dashboard/m-p/1209633#M47718</guid>
      <dc:creator>DebHSF</dc:creator>
      <dc:date>2022-09-05T08:23:01Z</dc:date>
    </item>
  </channel>
</rss>

