Using Arcgis Javascript 4.17 (local build), feature layers loads extremely slowly

219
3
12-02-2020 07:26 PM
JamesChan3
New Contributor

When I changed the Arcgis Javascript API on my locally hosted machine from 4.16 to 4.17, the feature layers loading in my Angular 8 app becomes very slow. I cannot even load 300 features. It was previously working relatively okay on the 4.16 version (besides a bit of lag where the different rotation degrees of the features results in the features flickering from 0 degrees to the desired angle)

In the 4.17 release notes, I read that the API is using web workers to store data for feature layers. Do I need to do anything to ensure the web workers are working properly? 

0 Kudos
3 Replies
JamesChan3
New Contributor

After some meddling, I realise that shifting the FeatureLayers out of the GroupLayers will resolve the bug of the FeatureLayers not rendering the features. However, this means that the GroupLayer class has some bugs in the 4.17 update, as my feature layers residing within the GroupLayers were working fine in 4.16 and before. I also face the issue of not being able to reorder GraphicLayers properly that reside within a GroupLayer in the 4.17 update. Hopefully Esri can resolve the GroupLayer issues.

0 Kudos
AndyGup
Esri Regular Contributor

Hi, can you share a stand-alone, non-framework sample that reproduces the GroupLayer issue(s) using the CDN? Offhand we weren't aware of any bugs similar to what you are describing, it would be great to narrow down the problem.

0 Kudos
AndyGup
Esri Regular Contributor

Quick follow-up:

  • We did some testing and found a 4.17 regression where GroupLayer is not visible on the view if it contains feature collection. We've opened an issue for this and we'll investigate if we can fix for 4.18 (which will be released in a few weeks).
  • We weren't able to reproduce any performance issues using this test app: https://codepen.io/U_B_U/pen/XWjXped?editors=1000. I also tested the same code using Angular 11 (I can only verify against the latest version) and it ran fine. 
  • We didn't see any re-ordering issues with any layers in a GroupLayer.

Please share a sample that reproduces the issues you are seeing and we'll take a look.

0 Kudos