<?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: Disabling Snapping on Sketch does not prevent querying layer for extent causing massive database load in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disabling-snapping-on-sketch-does-not-prevent/m-p/1139668#M76206</link>
    <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/115442"&gt;@RyderRoss&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;First of all, thank you for bringing this up to our attention. It seems this being caused by the SnappingControls widget. This issue doesn't present itself in Sketch until the SnappingControls widget was incorporated into Sketch. We are looking into this further, and will provide more information soon.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jose&lt;/P&gt;</description>
    <pubDate>Wed, 02 Feb 2022 00:31:21 GMT</pubDate>
    <dc:creator>JoseBanuelos</dc:creator>
    <dc:date>2022-02-02T00:31:21Z</dc:date>
    <item>
      <title>Disabling Snapping on Sketch does not prevent querying layer for extent causing massive database load</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disabling-snapping-on-sketch-does-not-prevent/m-p/1139607#M76196</link>
      <description>&lt;P&gt;When adding the Sketch widget to a map, the FeatureSnappingEngine fires off a request to query the extent of a private feature service of ours that has 140M records. This is happening even though we have all snapping features disabled in the config:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;		this.sketch = new Sketch({
			view: this.view,
			layer: this.graphicsLayer,
			availableCreateTools: ["point", "polygon", "circle"],
			snappingOptions: {
				featureEnabled: false,
				enabled: false,
				selfEnabled: false,
			  },
			visibleElements: {
				createTools: { polyline: false },
				selectionTools: { "rectangle-selection": false, "lasso-selection": false },
				settingsMenu: false,
			},
			creationMode: "single",
			defaultUpdateOptions: {
				tool: "reshape"
			}
		});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The&amp;nbsp; request url looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;https://example.com/arcgis/rest/services/PROD/ServiceName/MapServer/0/query?f=json&amp;amp;returnExtentOnly=true&amp;amp;returnCountOnly=true&amp;amp;outSR=102100&amp;amp;returnGeometry=false&amp;amp;spatialRel=esriSpatialRelIntersects&amp;amp;where=1%3D1&amp;amp;token=K2QQ07z....REDACTED....&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found someone else asking about snapping performance here:&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-api-for-javascript-questions/snapping-performance-issue-in-version-4-19/td-p/1052582/page/2" target="_blank"&gt;https://community.esri.com/t5/arcgis-api-for-javascript-questions/snapping-performance-issue-in-version-4-19/td-p/1052582/page/2&lt;/A&gt; They show a similar request being fired.&lt;/P&gt;&lt;P&gt;I believe this request ends up triggering a query on our postgres database that looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="sql"&gt;DECLARE sdecur_190_7264 BINARY CURSOR WITH HOLD FOR
  select  objectid,  st_asewkb(ST_setSRID(parcels_all.shape,-1)) AS shape,
  nlrgis.sde.parcels_all.GDB_GEOMATTR_DATA  from  nlrgis.sde.parcels_all  
where (( 1=1 )) and  ((sde.parcels_all.shape &amp;amp;&amp;amp; 
public.ST_setSRID(public.ST_GeomFromEWKB($1),3857)) = 't')  &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since we have 140M records in our database, and it's querying with 1=1, it takes over a minute to complete. When we have just a couple users loading this map, the database server becomes overloaded and ArcGIS Server starts to timeout all requests. We're running ArcGIS Enterprise 10.9.1 and ArcGIS JS 4.22 if that helps.&lt;/P&gt;&lt;P&gt;Is there a way to prevent the query for the snapping extent from being requested?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Feb 2022 22:26:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disabling-snapping-on-sketch-does-not-prevent/m-p/1139607#M76196</guid>
      <dc:creator>RyderRoss</dc:creator>
      <dc:date>2022-02-01T22:26:16Z</dc:date>
    </item>
    <item>
      <title>Re: Disabling Snapping on Sketch does not prevent querying layer for extent causing massive database load</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disabling-snapping-on-sketch-does-not-prevent/m-p/1139634#M76198</link>
      <description>&lt;P&gt;I've also tried by creating SnappingOptions and a SketchViewModel by hand and it still does not prevent the query.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;		const sketchViewModel = new SketchViewModel({
			view: this.view,
			layer: this.graphicsLayer,
			polygonSymbol: BasicMap.polygonSymbol,
			pointSymbol: BasicMap.pointSymbol,
			snappingOptions: new SnappingOptions({
				featureEnabled: false,
				enabled: false,
				selfEnabled: false,
			  }),
			defaultUpdateOptions: {
				tool: "reshape"
			}
		});

		this.sketch = new Sketch({
			viewModel: sketchViewModel,
			availableCreateTools: ["point", "polygon", "circle"],
			visibleElements: {
				createTools: { polyline: false },
				selectionTools: { "rectangle-selection": false, "lasso-selection": false },
				settingsMenu: false,
			},
			creationMode: "single",
		});&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 01 Feb 2022 23:04:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disabling-snapping-on-sketch-does-not-prevent/m-p/1139634#M76198</guid>
      <dc:creator>RyderRoss</dc:creator>
      <dc:date>2022-02-01T23:04:38Z</dc:date>
    </item>
    <item>
      <title>Re: Disabling Snapping on Sketch does not prevent querying layer for extent causing massive database load</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disabling-snapping-on-sketch-does-not-prevent/m-p/1139668#M76206</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/115442"&gt;@RyderRoss&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;First of all, thank you for bringing this up to our attention. It seems this being caused by the SnappingControls widget. This issue doesn't present itself in Sketch until the SnappingControls widget was incorporated into Sketch. We are looking into this further, and will provide more information soon.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jose&lt;/P&gt;</description>
      <pubDate>Wed, 02 Feb 2022 00:31:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disabling-snapping-on-sketch-does-not-prevent/m-p/1139668#M76206</guid>
      <dc:creator>JoseBanuelos</dc:creator>
      <dc:date>2022-02-02T00:31:21Z</dc:date>
    </item>
    <item>
      <title>Re: Disabling Snapping on Sketch does not prevent querying layer for extent causing massive database load</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disabling-snapping-on-sketch-does-not-prevent/m-p/1139671#M76207</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/349741"&gt;@JoseBanuelos&lt;/a&gt;&lt;/P&gt;&lt;P&gt;Let me know if there’s anything else I can share that would help.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Feb 2022 00:38:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disabling-snapping-on-sketch-does-not-prevent/m-p/1139671#M76207</guid>
      <dc:creator>RyderRoss</dc:creator>
      <dc:date>2022-02-02T00:38:20Z</dc:date>
    </item>
    <item>
      <title>Re: Disabling Snapping on Sketch does not prevent querying layer for extent causing massive database load</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disabling-snapping-on-sketch-does-not-prevent/m-p/1143312#M76323</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/349741"&gt;@JoseBanuelos&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Was wondering if you were able to look into this at all yet?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ryder&lt;/P&gt;</description>
      <pubDate>Fri, 11 Feb 2022 21:04:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disabling-snapping-on-sketch-does-not-prevent/m-p/1143312#M76323</guid>
      <dc:creator>RyderRoss</dc:creator>
      <dc:date>2022-02-11T21:04:48Z</dc:date>
    </item>
    <item>
      <title>Re: Disabling Snapping on Sketch does not prevent querying layer for extent causing massive database load</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disabling-snapping-on-sketch-does-not-prevent/m-p/1145254#M76386</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/115442"&gt;@RyderRoss&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;We have confirmed the issue to be a result of the SnappingControls widget. We have discussed the possible fixes for this, and are currently working on a solution. The target to get this fix is for version 4.24, so unfortunately it won't make it into the upcoming release 4.23. However, this is an issue we are prioritizing and should be in for 4.24.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jose&lt;/P&gt;</description>
      <pubDate>Thu, 17 Feb 2022 17:41:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disabling-snapping-on-sketch-does-not-prevent/m-p/1145254#M76386</guid>
      <dc:creator>JoseBanuelos</dc:creator>
      <dc:date>2022-02-17T17:41:56Z</dc:date>
    </item>
    <item>
      <title>Re: Disabling Snapping on Sketch does not prevent querying layer for extent causing massive database load</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disabling-snapping-on-sketch-does-not-prevent/m-p/1161833#M76941</link>
      <description>&lt;P&gt;I was glad to find this response!&amp;nbsp; It's been application-breaking for me in 4.21, 4.22 and 4.23, so I am still using 4.20.&amp;nbsp; &amp;nbsp;I was hoping it would be fixed in "4.24-next",&amp;nbsp; but that doesn't seem to be the case yet.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2022 20:40:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disabling-snapping-on-sketch-does-not-prevent/m-p/1161833#M76941</guid>
      <dc:creator>MattReames2</dc:creator>
      <dc:date>2022-04-06T20:40:18Z</dc:date>
    </item>
    <item>
      <title>Re: Disabling Snapping on Sketch does not prevent querying layer for extent causing massive database load</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disabling-snapping-on-sketch-does-not-prevent/m-p/1187560#M77798</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/349741"&gt;@JoseBanuelos&lt;/a&gt;&amp;nbsp;Just checking in to see if you think this will be in the 4.24 release. Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2022 22:08:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disabling-snapping-on-sketch-does-not-prevent/m-p/1187560#M77798</guid>
      <dc:creator>RyderRoss</dc:creator>
      <dc:date>2022-06-28T22:08:59Z</dc:date>
    </item>
    <item>
      <title>Re: Disabling Snapping on Sketch does not prevent querying layer for extent causing massive database load</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disabling-snapping-on-sketch-does-not-prevent/m-p/1187582#M77799</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/115442"&gt;@RyderRoss&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;This is indeed resolved in 4.24! We improved snapping and went with a lazy-load approach to creating FeatureSnappingLayerSources. Therefore, there will not be any extent queries unless a user manually checks the layer on for snapping or programmatically sets it in the SnappingOptions.featureSources collection.&lt;/P&gt;&lt;P&gt;Please feel free to try it out and report any issues you find.&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;/P&gt;&lt;P&gt;Jose&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2022 22:58:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disabling-snapping-on-sketch-does-not-prevent/m-p/1187582#M77799</guid>
      <dc:creator>JoseBanuelos</dc:creator>
      <dc:date>2022-06-28T22:58:20Z</dc:date>
    </item>
  </channel>
</rss>

