Improve loading time for mobile devices

Discussion created by egubser on Oct 24, 2017
Latest reply on Jun 1, 2018 by NicolasGIS



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.


Here are some timing values:

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.


Now if we simulate a mid-tier mobile device using Chrome's Developer Tools (throttled CPU & 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).
Loading the website (no basemap, no data access) takes about 4.5s and then it needs another 5.5s processing time until the first data access.

I have a strong suspicion that it is dojo or the ArcGIS JS API 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).

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.


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 attached build.profile.js)