Select to view content in your preferred language

Diplaying the added graphic in FeatureLayer is slower in bigger MapView container.

356
2
01-04-2024 07:38 AM
ericca
by
New Contributor II
Good day,
 
We are trying to load a graphic(polygon) to a FeatureLayer, but it loads slower as the size of the MapView container is increased. Please see attached video showing the issue. From the video, it seems like size of the map has an effect on graphics rendering. Any suggestion on a possible fix or optimization?
 
A few other details on the test (shown in the video):
 
  • Same polygon is used. Only the size (height and width) of the has changed
    SizeAdd/Load (Approx)Delete/Unload (Approx)
    Default (half screen)2 sec1 sec
    Fullscreen7 sec2 sec
    Resized screen (smallest)1 sec1 sec
    Resized screen (between default and full screen)4 sec2 sec
  • Full Screen mode does not use the built-in feature of MapView. It's just a resized div because the built in full screen does not allow us to display divs on top of it which we needed to.
  • The graphic is added/removed client side using applyEdits({ addFeatures: [] }) and applyEdits({ deleteFeatures: []}) .
  • The graphic/polygon is optimized using this tool https://sampleserver6.arcgisonline.com/arcgis/rest/services/Utilities/Geometry/GeometryServer/genera... so the graphic is pretty light. The test graphic in the video is just around 4KB.
  • We are using arcgis.js v 4.22. Tried using higher version 4.23 to 4.27 and same slowness is experienced. Tried the latest version 4.28. It's more slower and had to move the map for the graphic to load/unload. Moving the map sort of refreshes it (see attached video to for v 4.28 issue). Is there a bug reported similar to this?

 

 
 
 
0 Kudos
2 Replies
Noah-Sager
Esri Regular Contributor

Hi @ericca, thanks for posting your question here. Can you share a simplified, reproducible test-app for your use case? Hosted someplace like CodePen? This would help us debug the issue.

0 Kudos
ericca
by
New Contributor II

Hey Noah, here's the sample app - https://codepen.io/codestore/full/bGZgobE.

SampleApp.gif

After trying the sample app on other machines, found out that the slowness is experienced on machine that doesn't have GPU (Graphics Processing Unit) or have the "Use hardware acceleration when available" off. On machine that has it, load time is almost the same for bigger or smaller map view. But when not available, load time for same polygon is slow in bigger map view. See video above. 

Some of our users does not have GPU on their machines. An upgrade would definitely address this, but please let me know if this is something that might be addressed in code. Thank you.

ericca_0-1705335826035.png

 

0 Kudos