We are upgrading from the JS API version 3.X to 4.24 and we have run into a performance issue when using FeatureLayer objects. Previously we were using ArcGISDynamicMapServiceLayer objects, but these are no longer available in API version 4.
The upgraded version seems to make far more requests to the GIS server and take much longer when panning/zooming around the map. This seems to cause the initial layer load (when we zoom in to a visible scale) to take up 10 seconds, where it was previously less than 1 second.
See the attached screenshots for comparison. In particular, the FeatureLayer seems to make many requests to /query endpoint, whereas the ArcGISDynamicMapServiceLayer does not.
Can anyone offer any explanations as to why this is happening? Is there something I am missing when configuring layers, or am I on the wrong track altogether?
Thanks in advance,
Adrien French