2

Problem

I've been developing a web application for the first time using the JS API. When testing the performance of the website, I've had perfectly snappy use on relatively new hardware (such as my Surface Laptop 3 8GB RAM, Chrome v88) but cripplingly slow use on somewhat older hardware (MacBook Pro 13" 2016 8GB RAM, MacBook Pro 15" 2014 8GB RAM, Dell Inspiron 15 5000 2017 8GB RAM, all running Chrome v88).

Link to web app in development:

https://dmarkbreiter.github.io/lau-interactive/

Troubleshooting

Considering how these "older" hardware configs aren't very old, the laggy performance is troubling. At first I thought it might be a basemap or feature service that was slowing down the application, but when I tested sample apps on the developer page for the API, I had equally if not slower performance.

Example apps linked below:

https://developers.arcgis.com/javascript/latest/sample-code/featurelayer-query/ https://esri.github.io/dot-density-legend/ https://livingatlas.arcgis.com/sea-ice/

The above apps work perfectly fine on my Surface Laptop 3, but absolutely limp along on the other tested hardware configs.

UPDATE Looking at my own app, I see that two feature services (LAU_Localities_View and SoCal_Counties) have multiple GET requests at page load. I've included the Query String Parameters of one of them below:

f: pbf
geometry: {"spatialReference":{"latestWkid":3857,"wkid":102100},"xmin":-13149614.849954996,"ymin":3757032.814274987,"xmax":-12993071.816026995,"ymax":3913575.8482029866}
maxRecordCountFactor: 3
resultOffset: 0
resultRecordCount: 8000
where: 1=1
orderByFields: OBJECTID ASC
outFields: OBJECTID
outSR: 102100
quantizationParameters: {"extent":{"spatialReference":{"latestWkid":3857,"wkid":102100},"xmin":-13149614.849954996,"ymin":3757032.814274987,"xmax":-12993071.816026995,"ymax":3913575.8482029866},"mode":"view","originPosition":"upperLeft","tolerance":305.74811314062526}
resultType: tile
spatialRel: esriSpatialRelIntersects
geometryType: esriGeometryEnvelope
inSR: 102100

The first thing that strikes me as weird is the low maxRecordCountFactor of 3.

Question

Is this the expected behavior/performance of web applications built using the API?

If not, how can I make my application more performant on a variety of hardware configs? Even panning around a basemap feels and looks choppy on this hardware. Is this a known issue and if so, is there any workaround to ensure useable performance on a variety of hardware?

drm1217
  • 105
  • 7
  • I think if you are experiencing similar performance on your older machine with the examples on the arcgis js api site, then the issue is most likely with your specific hardware. Have you dug around in your dev tools to see what might be causing issues (network tab, errors, etc?) I have an older machine I use a lot as well (2012 mac, don't know specs off the top of my head), and I don't have issues with performance with the api, even when rendering multiple maps on a single webpage. Have you tried any arcgis js api apps on other older machines? – Seth Lutske Mar 05 '21 at 16:39
  • Thanks for the reply @SethLutske. I've linked a couple of the sample apps that gave me performance issues in the body of the question under `Troubleshooting`. Looking at the Network panel, I see multiple GET requests for a couple of the feature layers I've added to the map. I'm not sure if that's to be expected, but there are only two feature layers that have multiple requests on page load. I've included the `Query String Parameters` in the `Troubleshooting` paragraph on the main question. – drm1217 Mar 05 '21 at 18:21
  • @SethLutske, do you see the following warning on the dev panel with your 2012 mac? `[esri.views.2d.engine.webgl.WebGLDriverTest] A problem was detected with your graphics driver. Your driver does not appear to honor sampler precision specifiers, which may result in rendering issues due to numerical instability. We recommend ensuring that your drivers have been updated to the latest version. Applying lowp sampler workaround. [0.0.0.0]` – drm1217 Mar 05 '21 at 19:05

1 Answers1

3

It would appear that the issue is with Esri's WebGl engine and it not working with the machine's graphics driver as evidenced by the following console warning on Chrome based browsers:

[esri.views.2d.engine.webgl.WebGLDriverTest] A problem was detected with your graphics driver. Your driver does not appear to honor sampler precision specifiers, which may result in rendering issues due to numerical instability. We recommend ensuring that your drivers have been updated to the latest version. Applying lowp sampler workaround. [0.0.0.0]

When the web apps linked in the question were tested on FireFox 86, they worked perfectly fine and without the warning above.

drm1217
  • 105
  • 7
  • Very interesting! I'm not suprised though, webgl is not as friendly to older hardware as we might hope. – Seth Lutske Mar 05 '21 at 19:47
  • Considering that how a five year old machine isn't exactly that old, are there any work arounds? Telling users to update their graphics drivers isn't exactly a suitable solution. – drm1217 Mar 05 '21 at 19:49
  • I would agree, but these seem to be part of the [hardware requirements](https://developers.arcgis.com/javascript/latest/system-requirements/#hardware-requirements) as defined in the WebGL spec, with is beyond esri itself. If you want backwards compatibility, you might have to downgrade to 3x, or use another library. I know that answer sucks, but the latest apis sometimes require the latest hardware – Seth Lutske Mar 05 '21 at 20:33