<?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 Improve loading time for mobile devices in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/improve-loading-time-for-mobile-devices/m-p/350324#M32449</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we're developing a small web application with the sole purpose of displaying a map and some features fetched from a feature layer service. We're using webpack with esri-loader and load all esri modules at once at the beginning. The website is served from S3 via CloudFront over a corporate wireless network to a laptop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here are some timing values:&lt;/P&gt;&lt;P&gt;Loading the website (no basemap, no data access) takes about 1.3s using the CDN (see attached Chrome ArcGIS-CDN.PNG). When using a custom build of the ArcGIS JS API, where all needed modules are compiled into dojo.js in order to avoid those many small javascript requests, it takes only about 0.1s (Chrome Custom-Build.PNG). Until the first data access it takes 1.3s or 0.9s respectively. So far so good.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now if we simulate a mid-tier mobile device using Chrome's Developer Tools (throttled CPU &amp;amp; network, increased latency) the time until the first data access increases to 12s with Esri's CDN (Chrome Mid-tier ArcGIS-CDN.PNG) or 10s with our custom build (Chrome Mid-tier Custom-Build.PNG).&lt;BR /&gt;Loading the website (no basemap, no data access) takes about 4.5s &lt;STRONG&gt;and then it needs another 5.5s processing time &lt;/STRONG&gt;until the first data access.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I have a strong suspicion that it is dojo or the ArcGIS JS API&amp;nbsp;that causes this delay because Chrome's profiler tells me that the interpreter spends a lot of time in dojo.js (dojo-profile.PNG, note: no cpu throttling in this case).&lt;/P&gt;&lt;P&gt;I think Chrome's Simulation seems reasonable because using my private smart phone over mobile broadband takes about the same time to load the Website.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to speed up the loading time any further or is this as good as it gets? (the custom build was made using the&amp;nbsp;attached build.profile.js)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers!&lt;BR /&gt;egubser&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Oct 2017 14:25:10 GMT</pubDate>
    <dc:creator>ElioGubser</dc:creator>
    <dc:date>2017-10-24T14:25:10Z</dc:date>
    <item>
      <title>Improve loading time for mobile devices</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/improve-loading-time-for-mobile-devices/m-p/350324#M32449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we're developing a small web application with the sole purpose of displaying a map and some features fetched from a feature layer service. We're using webpack with esri-loader and load all esri modules at once at the beginning. The website is served from S3 via CloudFront over a corporate wireless network to a laptop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here are some timing values:&lt;/P&gt;&lt;P&gt;Loading the website (no basemap, no data access) takes about 1.3s using the CDN (see attached Chrome ArcGIS-CDN.PNG). When using a custom build of the ArcGIS JS API, where all needed modules are compiled into dojo.js in order to avoid those many small javascript requests, it takes only about 0.1s (Chrome Custom-Build.PNG). Until the first data access it takes 1.3s or 0.9s respectively. So far so good.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now if we simulate a mid-tier mobile device using Chrome's Developer Tools (throttled CPU &amp;amp; network, increased latency) the time until the first data access increases to 12s with Esri's CDN (Chrome Mid-tier ArcGIS-CDN.PNG) or 10s with our custom build (Chrome Mid-tier Custom-Build.PNG).&lt;BR /&gt;Loading the website (no basemap, no data access) takes about 4.5s &lt;STRONG&gt;and then it needs another 5.5s processing time &lt;/STRONG&gt;until the first data access.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I have a strong suspicion that it is dojo or the ArcGIS JS API&amp;nbsp;that causes this delay because Chrome's profiler tells me that the interpreter spends a lot of time in dojo.js (dojo-profile.PNG, note: no cpu throttling in this case).&lt;/P&gt;&lt;P&gt;I think Chrome's Simulation seems reasonable because using my private smart phone over mobile broadband takes about the same time to load the Website.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to speed up the loading time any further or is this as good as it gets? (the custom build was made using the&amp;nbsp;attached build.profile.js)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers!&lt;BR /&gt;egubser&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Oct 2017 14:25:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/improve-loading-time-for-mobile-devices/m-p/350324#M32449</guid>
      <dc:creator>ElioGubser</dc:creator>
      <dc:date>2017-10-24T14:25:10Z</dc:date>
    </item>
    <item>
      <title>Re: Improve loading time for mobile devices</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/improve-loading-time-for-mobile-devices/m-p/350325#M32450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;@&lt;SPAN style="background-color: #ffffff;"&gt;egubser I do have some suggestions.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&amp;gt;&amp;gt;&lt;SPAN&gt;We're using webpack with esri-loader and load all esri modules at once at the beginning.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;I have a number of initial thoughts:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;1) Where possible, use&amp;nbsp;a &lt;A href="https://github.com/Esri/esri-loader#lazy-loading-the-arcgis-api-for-javascript"&gt;lazy loading pattern with esri-loader&lt;/A&gt;&amp;nbsp;for modules you don't need immediately. Excellent that you are experimenting with both the built version and comparing it with the CDN.&amp;nbsp;Also try to lazy load any other resources (images, 3rd party libraries, CSS) that aren't needed immediately.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) There are approximately&amp;nbsp;eight .PNG images that are loading slowly, for example: 46129.png and 46128.png. Are these your own custom images? 46129.png is 46.4KB took 296ms using Esri CDN. If these are your own images you can try to optimize them, or lazy load them if you don't need them immediately.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4) I see quite a few queries. If possible look into optimizing how many features are loaded on initial load, or perhaps lazy loading feature layers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Andy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Oct 2017 08:54:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/improve-loading-time-for-mobile-devices/m-p/350325#M32450</guid>
      <dc:creator>AndyGup</dc:creator>
      <dc:date>2017-10-25T08:54:30Z</dc:date>
    </item>
    <item>
      <title>Re: Improve loading time for mobile devices</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/improve-loading-time-for-mobile-devices/m-p/350326#M32451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&amp;nbsp;for your suggestions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) For comparison, I've run a simulation (Chrome Nexus 5, 3GFast) on webpagetest.org with our web app (see screenshot below)&amp;nbsp;and with the map view example&amp;nbsp; &lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/intro-mapview/index.html"&gt;https://developers.arcgis.com/javascript/latest/sample-code/intro-mapview/index.html&lt;/A&gt; (see &lt;A href="https://www.webpagetest.org/result/171025_2V_03fad0115f0e3ed1f2d790d4e109292e/"&gt;https://www.webpagetest.org/result/171025_2V_03fad0115f0e3ed1f2d790d4e109292e/&lt;/A&gt; ). The loading time is about the same.&lt;BR /&gt;2) These are the basemap tiles coming from a third party. We are currently in the process of replacing them with our own.&lt;BR /&gt;4) Indeed, we can avoid two or three of these queries. (Note that those queries and basemap images are not included in the loading time.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image" height="753" src="https://community.esri.com/legacyfs/online/381340_webapp-test.png" width="159" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;BR /&gt;egubser&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Oct 2017 13:37:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/improve-loading-time-for-mobile-devices/m-p/350326#M32451</guid>
      <dc:creator>ElioGubser</dc:creator>
      <dc:date>2017-10-25T13:37:13Z</dc:date>
    </item>
    <item>
      <title>Re: Improve loading time for mobile devices</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/improve-loading-time-for-mobile-devices/m-p/350327#M32452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the problem that Elio is refering to is not related to networking (though it is important to optimize here and your suggestions are very helpful).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The most&amp;nbsp;urgent problem is about the fact that - on a typical mobile device - the JS engine takes about 5.5 secs to inititiate the map framework - with no network interaction. This is the 5.5 sec gap shown in&amp;nbsp;&lt;A _jive_internal="true" href="https://community.esri.com/servlet/JiveServlet/download/2128-204083-724172-186101/Chrome Custom-Build.PNG"&gt;network profile of the mobile simulation&lt;/A&gt;. Is there a way to improve the client performance for the JavaScript initialization (other than buying faster phones)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the moment, I&amp;nbsp;have the impression that there is no way to improve the client processing time because of the way dojo works. If we want to decrease the initialization time for this webmap, we need to say goodbye to the ArcGIS JS API and use&amp;nbsp;&lt;A href="https://github.com/Esri/esri-leaflet"&gt;Leaflet with tools to work with ArcGIS services.&lt;/A&gt;&amp;nbsp;Am I wrong?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Oct 2017 08:40:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/improve-loading-time-for-mobile-devices/m-p/350327#M32452</guid>
      <dc:creator>StephanHeuel</dc:creator>
      <dc:date>2017-10-26T08:40:37Z</dc:date>
    </item>
    <item>
      <title>Re: Improve loading time for mobile devices</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/improve-loading-time-for-mobile-devices/m-p/350328#M32453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Stephan, Elio, I have&amp;nbsp;more questions for you, but it might be best&amp;nbsp;to take this conversation offline so we can quickly and more thoroughly dig into&amp;nbsp;your observations and use cases.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There may be a variety of things we can look at. All web app performance tweaks come with both pluses and minuses and should be explored very carefully. What works on some devices may not work so well on other devices, etc.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the meantime,&amp;nbsp;do you have sample code you can share? And, can you send me&amp;nbsp;the link to your web page performance test? I'd also like to run some local tests.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, what device(s) are using for testing and what versions of the operating system are they running?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Oct 2017 23:27:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/improve-loading-time-for-mobile-devices/m-p/350328#M32453</guid>
      <dc:creator>AndyGup</dc:creator>
      <dc:date>2017-10-30T23:27:43Z</dc:date>
    </item>
    <item>
      <title>Re: Improve loading time for mobile devices</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/improve-loading-time-for-mobile-devices/m-p/350329#M32454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/254403"&gt;Elio Gubser&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So finally, did you find anything interesting to improve your map performance on mobile ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2018 14:09:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/improve-loading-time-for-mobile-devices/m-p/350329#M32454</guid>
      <dc:creator>NicolasGIS</dc:creator>
      <dc:date>2018-05-23T14:09:21Z</dc:date>
    </item>
    <item>
      <title>Re: Improve loading time for mobile devices</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/improve-loading-time-for-mobile-devices/m-p/350330#M32455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/129432"&gt;Nicolas Guilhaudin&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the 4.6 Release, they have optimized the startup routine and reduced the initial download size by ~1 MB.&lt;/P&gt;&lt;P&gt;But IMO, the underlying problem remains that dojo does a lot of script processing on startup which results in higher loading times on older, less performant, hardware.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Elio&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2018 06:40:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/improve-loading-time-for-mobile-devices/m-p/350330#M32455</guid>
      <dc:creator>ElioGubser</dc:creator>
      <dc:date>2018-05-29T06:40:43Z</dc:date>
    </item>
    <item>
      <title>Re: Improve loading time for mobile devices</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/improve-loading-time-for-mobile-devices/m-p/350331#M32456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No miracle then ... &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;Many thanks for the reply&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jun 2018 09:18:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/improve-loading-time-for-mobile-devices/m-p/350331#M32456</guid>
      <dc:creator>NicolasGIS</dc:creator>
      <dc:date>2018-06-01T09:18:00Z</dc:date>
    </item>
  </channel>
</rss>

