<?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: FeatureLayers returning all features on load in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayers-returning-all-features-on-load/m-p/1632373#M87369</link>
    <description>&lt;P&gt;Thanks for showing us this option. I agree, we should be able to make the choice on whether we enable this or not.&lt;/P&gt;</description>
    <pubDate>Fri, 11 Jul 2025 12:36:22 GMT</pubDate>
    <dc:creator>EricLake1</dc:creator>
    <dc:date>2025-07-11T12:36:22Z</dc:date>
    <item>
      <title>FeatureLayers returning all features on load</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayers-returning-all-features-on-load/m-p/1631536#M87352</link>
      <description>&lt;P&gt;Starting around version 4.20 of the ESRI JavaScript API, we noticed that FeatureLayers began returning &lt;EM&gt;all&lt;/EM&gt; features from the server when the layer is loaded or made visible, regardless of the current map extent. I now see this behavior is confirmed in the &lt;A target="_new" rel="noopener"&gt;4.33 release notes&lt;/A&gt; and appears to be the new standard.&lt;/P&gt;&lt;P&gt;We manage hundreds of map services, and some layers contain tens of thousands of features. Now, even simple web maps with only 10–15 layers can take &lt;STRONG&gt;20–30 seconds to load&lt;/STRONG&gt;, depending on how many features are in each. This is significantly affecting performance and usability.&lt;/P&gt;&lt;P&gt;We’ve confirmed:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;Even if the map is zoomed in before the layer is toggled visible, &lt;STRONG&gt;all features are still fetched&lt;/STRONG&gt; from the server.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;This behavior occurs even with small test apps using basic FeatureLayers from various sources.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;It's not specific to our server; we've tried ArcGIS Server 11 and tested with binary (PBF) format responses—no significant improvement.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;Questions:&lt;/STRONG&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;Why does the FeatureLayer no longer respect the current extent when requesting features?&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Is this really the permanent behavior moving forward?&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Is the only viable solution to &lt;STRONG&gt;switch to MapImageLayer&lt;/STRONG&gt; for every service that contains a large number of features?&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Are there &lt;STRONG&gt;any workarounds or configurations&lt;/STRONG&gt; (e.g.,&amp;nbsp;definitionExpression, featureReduction, etc.) that can force extent-based filtering?&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;If this is the intended behavior, this change will significantly increase the load on our infrastructure and may require a complete overhaul of our web maps.&lt;/P&gt;&lt;P&gt;We’d really appreciate any insights, solutions, or confirmation from Esri or others who’ve encountered and worked around this.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jul 2025 13:44:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayers-returning-all-features-on-load/m-p/1631536#M87352</guid>
      <dc:creator>EricLake1</dc:creator>
      <dc:date>2025-07-09T13:44:50Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayers returning all features on load</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayers-returning-all-features-on-load/m-p/1631633#M87353</link>
      <description>&lt;P&gt;Hi there,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Is it possible for you to share your webmap url with me? You can direct message me if you dont want to share publicly.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jul 2025 15:48:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayers-returning-all-features-on-load/m-p/1631633#M87353</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2025-07-09T15:48:22Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayers returning all features on load</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayers-returning-all-features-on-load/m-p/1631771#M87355</link>
      <description>&lt;P&gt;Here is a simple codepen showing the issue. Note that I have tried layers from multiple different servers, like ESRI, PASDA &amp;amp; PA, they all exhibit this behavior.&lt;BR /&gt;&lt;BR /&gt;When this codepen loads, it loads ESRI cities from the sample server though the initial map extent is very small. The right panel queries for all features in the LayerView for the layer and shows the total number of features loaded, which you can also see in the network tab.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://codepen.io/elake2018/pen/ByoaNMq?editors=1000" target="_blank"&gt;FeatureLayer Loading All Features&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jul 2025 19:45:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayers-returning-all-features-on-load/m-p/1631771#M87355</guid>
      <dc:creator>EricLake1</dc:creator>
      <dc:date>2025-07-09T19:45:25Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayers returning all features on load</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayers-returning-all-features-on-load/m-p/1632027#M87358</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;Thank you for sharing the codepen. However, I’m already very familiar with this behavior, so a basic example won’t help us investigate the issue you originally described. To properly assess and address the performance concerns, we need access to your actual webmap.&lt;/P&gt;&lt;P&gt;Starting with version 4.19, the ArcGIS Maps SDK for JavaScript began supporting the fetching of all features from point feature services at initialization, provided certain conditions are met. As of version 4.33, this behavior has been extended to AGOL-hosted feature services with polygon, polyline, and multipoint geometries, again assuming the appropriate conditions are satisfied. This enhancement improves app responsiveness by loading all features at once and eliminating repeated server requests as users interact with the map.&lt;/P&gt;&lt;P&gt;We need to examine your webmap directly to determine how your data aligns with these conditions. This will help us assess performance and potentially fine-tune the behavior further. Would you be able to share the webmap with us?&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jul 2025 15:01:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayers-returning-all-features-on-load/m-p/1632027#M87358</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2025-07-10T15:01:41Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayers returning all features on load</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayers-returning-all-features-on-load/m-p/1632058#M87359</link>
      <description>That's fine, but this does not work with large datasets, unless you are&lt;BR /&gt;telling me the API should be able to download all 300k+ records when we add&lt;BR /&gt;a FeatureLayer to a map. We have quite a few large datasets. The issue we&lt;BR /&gt;have is with points, but it gets worse with polylines and polygons as the&lt;BR /&gt;amount of data gets even larger.&lt;BR /&gt;&lt;BR /&gt;Is there some documentation that you can provide that would help us make&lt;BR /&gt;this work better?&lt;BR /&gt;&lt;BR /&gt;How do I generate or find this webmap? What exactly are you asking for?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;</description>
      <pubDate>Thu, 10 Jul 2025 15:42:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayers-returning-all-features-on-load/m-p/1632058#M87359</guid>
      <dc:creator>EricLake1</dc:creator>
      <dc:date>2025-07-10T15:42:43Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayers returning all features on load</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayers-returning-all-features-on-load/m-p/1632088#M87361</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/105410"&gt;@EricLake1&lt;/a&gt;, in most cases snapshotting features reduces the load on the backend -- that's why we made this change. The alternative is making many tile queries (queries with extents) which then hit the spatial index on the backend. Enterprise can really chug with this as it doesn't yet support caching. Consider map load: assuming the map is full screen, then on a 1440p monitor you will be making a minimum of 15 tile queries if we don't use snapshot mode. As you interact with the map and pan around, that will result in many additional queries being made. With snapshotting the service however, once those initial queries are done, no additional queries need to be made. From our testing snapshotting significantly reduces load on the backend with realistic scenarios (many users interacting with a map over some period of time).&lt;/P&gt;&lt;P&gt;We don't snapshot in every case, and it includes several factors like whether the service is editable, and count thresholds based on how zoomed out are you relative to the total layer's extent.&lt;/P&gt;&lt;P&gt;For polygons &amp;amp; polylines, we make exceedslimit queries to check the vertex and feature count. At the moment, we only snapshot polygons &amp;amp; polylines if the count is 1000-2000 (exact value depends on the % of the layer you are looking at)&lt;/P&gt;&lt;P&gt;If the layer isn't visible, I don't think you should be seeing any features being downloaded. For instance, I don't see pbf data queries getting made with&amp;nbsp;&lt;A href="https://codepen.io/matt9222/pen/YPyzaLO?editors=1000" target="_blank"&gt;https://codepen.io/matt9222/pen/YPyzaLO?editors=1000&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jul 2025 16:31:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayers-returning-all-features-on-load/m-p/1632088#M87361</guid>
      <dc:creator>mgeorge</dc:creator>
      <dc:date>2025-07-10T16:31:20Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayers returning all features on load</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayers-returning-all-features-on-load/m-p/1632233#M87365</link>
      <description>&lt;P&gt;Correction: we actually don't snapshot polygons/polylines for non-AGOL hosted at all yet. That is however planned for the near-term. So you shouldn't be seeing this in your environment.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jul 2025 22:31:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayers-returning-all-features-on-load/m-p/1632233#M87365</guid>
      <dc:creator>mgeorge</dc:creator>
      <dc:date>2025-07-10T22:31:40Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayers returning all features on load</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayers-returning-all-features-on-load/m-p/1632259#M87366</link>
      <description>&lt;P&gt;You can disable the snapshot behavior by adding this prior to loading the SDK:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;script type="text/javascript"&amp;gt;
	window.esriConfig = {
		has: {
			"featurelayer-snapshot-enabled": !1 // disable snapshot
		}
	};
&amp;lt;/script&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;For example, in your codepen, you'd add it before this line:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;script src="https://js.arcgis.com/4.32/"&amp;gt;&amp;lt;/script&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't think I've seen any official documentation for this functionality, but it gets mentioned somewhat casually from time to time, like &lt;A href="https://developers.arcgis.com/javascript/latest/4.28/#big-integer-support-beta" target="_self"&gt;here&lt;/A&gt; and &lt;A href="https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/enterprise-point-featurelayers-in-4-20/m-p/1134770#M75967" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;My two cents on this particular issue: Esri would do well to allow developers to make this decision on a layer-by-layer basis similar to how it was done &lt;A href="https://developers.arcgis.com/javascript/3/jsapi/featurelayer-amd.html#constructors" target="_self"&gt;in 3.x&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jul 2025 00:09:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayers-returning-all-features-on-load/m-p/1632259#M87366</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2025-07-11T00:09:43Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayers returning all features on load</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayers-returning-all-features-on-load/m-p/1632373#M87369</link>
      <description>&lt;P&gt;Thanks for showing us this option. I agree, we should be able to make the choice on whether we enable this or not.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jul 2025 12:36:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayers-returning-all-features-on-load/m-p/1632373#M87369</guid>
      <dc:creator>EricLake1</dc:creator>
      <dc:date>2025-07-11T12:36:22Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayers returning all features on load</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayers-returning-all-features-on-load/m-p/1632374#M87370</link>
      <description>&lt;P&gt;You realize this basically eliminates the ability for us to use large datasets with the API? On layers with hundreds of thousands of features, it takes forever for the map to load.&lt;BR /&gt;&lt;BR /&gt;Leave the option to turn this on or off, we can decide it it kills our servers.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jul 2025 12:38:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayers-returning-all-features-on-load/m-p/1632374#M87370</guid>
      <dc:creator>EricLake1</dc:creator>
      <dc:date>2025-07-11T12:38:23Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayers returning all features on load</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayers-returning-all-features-on-load/m-p/1632505#M87373</link>
      <description>&lt;P&gt;You can use the flag, but just be aware that this is not officially supported and likely will change. Some old versions of enterprise had a bug where querying for count was doing a select * from the database, and this flag was only really given out to work around that.&amp;nbsp;&lt;/P&gt;&lt;P&gt;There's a very good chance that you will be significantly increasing the load on your backend by disabling snapshot, so just be careful to do some stress testing. 60k features is not a lot of data, and I would definitely not disable it in that case.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jul 2025 16:45:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayers-returning-all-features-on-load/m-p/1632505#M87373</guid>
      <dc:creator>mgeorge</dc:creator>
      <dc:date>2025-07-11T16:45:43Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayers returning all features on load</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayers-returning-all-features-on-load/m-p/1672527#M87966</link>
      <description>&lt;P&gt;I’m using version 4.29.10 (ESM), and the suggested solution doesn’t seem to work for me. My FeatureLayer keeps loading indefinitely.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Dec 2025 23:59:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayers-returning-all-features-on-load/m-p/1672527#M87966</guid>
      <dc:creator>ZhijieShen1</dc:creator>
      <dc:date>2025-12-11T23:59:32Z</dc:date>
    </item>
  </channel>
</rss>

