<?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: IE8 QueryTask getting the 'Script Running Slowly' message in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/ie8-querytask-getting-the-script-running-slowly/m-p/711165#M66113</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Derek&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That's a great help, thank you!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The generalised geometries we had experimented with before your help, was fairly simple simplification of the regions in desktop ArcGIS, before publishing. We found it was taking significant simplfications to get them working in IE8.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've looked up maxAllowableOffset using the various links you pointed me at, and this does seem to work very well and speed up the application for all browsers, not just IE8.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Because of the on-the-fly simplfication it is doing, there is still a chance that &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;a) the slow script message could appear - but greatly reduced from the likelihood before&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;b) the query task for the points could get a geometry which is too simplified (we're basing on zoom level as per the example on the ESRI documentation)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But overall, we're impressed with the difference it makes. We're currently getting other team members to review the solution before updating the website.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Many thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 01 Mar 2013 15:00:41 GMT</pubDate>
    <dc:creator>AlistairDorman-Smith</dc:creator>
    <dc:date>2013-03-01T15:00:41Z</dc:date>
    <item>
      <title>IE8 QueryTask getting the 'Script Running Slowly' message</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/ie8-querytask-getting-the-script-running-slowly/m-p/711162#M66110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a problem with IE8 performance with running a queryTask.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've searched the forum for similar answers but all the similar threads seem to relate to showing too many points. I'm only working with 695 points, and my query task is only trying to show points within a certain geometry.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In IE8, I get the "script is running slowly" dialog box when the queryTask is run - the script still runs fine if you say continue, but it is very slow.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It's obviously a performance issue, and IE8 is known for a slow JS engine, but I have no idea where the problem is. Simplified geometries have been experimented with, in case that was an issue. In general terms the problem only occurs with larger areas (suggesting larger geometries or complex lines) are the problem, but this isn't always true when you rank each region by size and then click through sequentially.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="http://naei.defra.gov.uk/data/local-authority-co2-map" rel="nofollow" target="_blank"&gt;http://naei.defra.gov.uk/data/local-authority-co2-map&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;If you click on the link above, and select a region, it does two queries - one to get the layer information, and the second (which is causing the problems) to get the points within the selected region.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I disable the "execute" function of the queryTask then it runs fine so it's definitely something related to the queryTask itself.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Works fine in IE9 plus modern browsers. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Grateful for any help you can give.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2013 12:46:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/ie8-querytask-getting-the-script-running-slowly/m-p/711162#M66110</guid>
      <dc:creator>AlistairDorman-Smith</dc:creator>
      <dc:date>2013-02-19T12:46:12Z</dc:date>
    </item>
    <item>
      <title>Re: IE8 QueryTask getting the 'Script Running Slowly' message</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/ie8-querytask-getting-the-script-running-slowly/m-p/711163#M66111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Following some additional testing, it appears the problem is when there's a complex geography that is being passed into the query task.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Should there be an issue for IE8, handling complex geographies for query tasks? It would seem to be quite a basic bit of functionality for any browser to do?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Grateful for any thoughts!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 11:47:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/ie8-querytask-getting-the-script-running-slowly/m-p/711163#M66111</guid>
      <dc:creator>AlistairDorman-Smith</dc:creator>
      <dc:date>2013-02-28T11:47:48Z</dc:date>
    </item>
    <item>
      <title>Re: IE8 QueryTask getting the 'Script Running Slowly' message</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/ie8-querytask-getting-the-script-running-slowly/m-p/711164#M66112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Following some additional testing, it appears the problem is when there's a complex geography that is being passed into the query task.&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I would guess that it's a complex geometry being &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;returned&lt;/SPAN&gt;&lt;SPAN&gt; by a queryTask.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Looking at your app, clicking a polygon (Northumberland, for instance), causes ~1.2MB of JSON to be pushed to the client. This is almost certainly what is bogging down IE. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You said you'd experimented with generalized geometries. Can you elaborate on what you've done?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My recommended solution would be to use &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://help.arcgis.com/en/webapi/javascript/arcgis/jsapi/#Query/maxAllowableOffset" rel="nofollow" target="_blank"&gt;maxAllowableOffset&lt;/A&gt;&lt;SPAN&gt; to have the geometry generalized server side before being sent to the client. This will result in a faster response from the server. A little extra work is done server side but less data is sent to the client. Since the majority of time for the request is spent downloading data and parsing data, sending less data to the client is where you'll see the biggest performance improvement (even in browses that handle this volume of data easily, you should see better performance as it will take less time to download the data from the server). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's a simple example app showing the benefits of using maxAllowableOffset with polygon data:&amp;nbsp; &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://servicesbeta.esri.com/demos/graphics-performance/polys.html" rel="nofollow" target="_blank"&gt;http://servicesbeta.esri.com/demos/graphics-performance/polys.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That app is linked from our &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://help.arcgis.com/en/webapi/javascript/arcgis/jshelp/#limits_for_graphics" rel="nofollow" target="_blank"&gt;Determining Limits for Map Graphics&lt;/A&gt;&lt;SPAN&gt; help topic which I would recommend reading. &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://help.arcgis.com/en/webapi/javascript/arcgis/jshelp/#best_practices_feature_layers" rel="nofollow" target="_blank"&gt;Feature layer best practices&lt;/A&gt;&lt;SPAN&gt; is recommended reading as well.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 13:55:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/ie8-querytask-getting-the-script-running-slowly/m-p/711164#M66112</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2013-02-28T13:55:34Z</dc:date>
    </item>
    <item>
      <title>Re: IE8 QueryTask getting the 'Script Running Slowly' message</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/ie8-querytask-getting-the-script-running-slowly/m-p/711165#M66113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Derek&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That's a great help, thank you!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The generalised geometries we had experimented with before your help, was fairly simple simplification of the regions in desktop ArcGIS, before publishing. We found it was taking significant simplfications to get them working in IE8.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've looked up maxAllowableOffset using the various links you pointed me at, and this does seem to work very well and speed up the application for all browsers, not just IE8.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Because of the on-the-fly simplfication it is doing, there is still a chance that &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;a) the slow script message could appear - but greatly reduced from the likelihood before&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;b) the query task for the points could get a geometry which is too simplified (we're basing on zoom level as per the example on the ESRI documentation)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But overall, we're impressed with the difference it makes. We're currently getting other team members to review the solution before updating the website.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Many thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Mar 2013 15:00:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/ie8-querytask-getting-the-script-running-slowly/m-p/711165#M66113</guid>
      <dc:creator>AlistairDorman-Smith</dc:creator>
      <dc:date>2013-03-01T15:00:41Z</dc:date>
    </item>
    <item>
      <title>Re: IE8 QueryTask getting the 'Script Running Slowly' message</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/ie8-querytask-getting-the-script-running-slowly/m-p/711166#M66114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BR /&gt;That's a great help, thank you!&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Happy to help!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BR /&gt;Because of the on-the-fly simplfication it is doing, there is still a chance that &lt;BR /&gt;a) the slow script message could appear - but greatly reduced from the likelihood before&lt;BR /&gt;b) the query task for the points could get a geometry which is too simplified (we're basing on zoom level as per the example on the ESRI documentation)&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think you're misunderstanding where the simplification happens and what causes the slow script error in IE. The simplification happens server side. Instead of the server trying to push one MB of geometry to the client, the geometry is simplified and usually reduced to no more than 100 KB or so (usually even less if you're using the settings we recommend). The slow script error is caused in IE by trying to parse large amounts of JSON. This error can be prevented by sending less data to the client, which is why we recommend using simplified geometries.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Mar 2013 17:07:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/ie8-querytask-getting-the-script-running-slowly/m-p/711166#M66114</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2013-03-01T17:07:21Z</dc:date>
    </item>
    <item>
      <title>Re: IE8 QueryTask getting the 'Script Running Slowly' message</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/ie8-querytask-getting-the-script-running-slowly/m-p/711167#M66115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for your further explanation, really useful to learn how this can help large geometries!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Mar 2013 06:56:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/ie8-querytask-getting-the-script-running-slowly/m-p/711167#M66115</guid>
      <dc:creator>AlistairDorman-Smith</dc:creator>
      <dc:date>2013-03-04T06:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: IE8 QueryTask getting the 'Script Running Slowly' message</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/ie8-querytask-getting-the-script-running-slowly/m-p/711168#M66116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;My recommended solution would be to use &lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/jsapi/#Query/maxAllowableOffset"&gt;maxAllowableOffset&lt;/A&gt; to have the geometry generalized server side before being sent to the client. This will result in a faster response from the server. A little extra work is done server side but less data is sent to the client. Since the majority of time for the request is spent downloading data and parsing data, sending less data to the client is where you'll see the biggest performance improvement (even in browses that handle this volume of data easily, you should see better performance as it will take less time to download the data from the server). &lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've seen the use of a max offset recommended a lot on forums, but according to one of the links you provided (&lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/jshelp/#best_practices_feature_layers"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/jshelp/#best_practices_feature_layers&lt;/A&gt;&lt;SPAN&gt;) layers in ONDEMAND mode automatically set a maxAllowableOffset.&amp;nbsp; I know in certain instances one can't use ONDEMAND mode (ie for a map I'm making that requires a layer be added in selection mode); but otherwise, is there a reason to manually set the max offset as opposed to just setting the layer to ONDEMAND mode?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Mar 2013 18:29:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/ie8-querytask-getting-the-script-running-slowly/m-p/711168#M66116</guid>
      <dc:creator>BrettGreenfield__DNR_</dc:creator>
      <dc:date>2013-03-04T18:29:12Z</dc:date>
    </item>
  </channel>
</rss>

