Feature Layer Graphics Limitation via Source

01-25-2018 10:01 AM
New Contributor II


I'm trying to load a simple Map & MapView with a single Feature Layer and am seeing some serious performance degradation when I attempt to load the layer with thousands of features. 

I'm using the ArcGIS JS API v4.6.

I'm not loading the Feature Layer graphics via an ArcGIS Feature Service URL, but rather loading it client side via the "source" property.

If I limit the number of features to 1000 the map becomes responsive. 

If I load the Feature Layer with an ArcGIS Feature Service URL the map is fully responsive even when rendering 30,000+ features.

The data set I'm using to load the Feature Layer locally via the "source" property is a small subset of the data available on the Feature Service, and the graphic I'm using is a very small SVG (approximately 600 bytes).

The reason for my question is to see if there is any known limitation to loading a Feature Layer's graphics client side via the source property, or if there is a way to emulate the optimization/rendering logic utilized when a Feature Layer is loaded from an ArcGIS Feature Service URL.

I've confirmed that my browser supports WebGL and have even added the "esri-featurelayer-webgl" setting to the dojoConfig in the <head> of my index.html file in order to enable WebGL for Feature Layers as seen here:

ArcGIS API for JavaScript Sandbox 

var dojoConfig = {
has: {
// Enable webgl for feature layer in MapView
"esri-featurelayer-webgl": 1

Unfortunately i'm not seeing any effect of enabling this setting.  Hopefully someone can shed some light on what I'm doing wrong.



0 Kudos
11 Replies
New Contributor III

It seems like the FeatureLayer, when created with an array of client-side graphics via the source property is rendered as SVG.  SVG is inherently nonperformant as the number of on screen element increases.  Can we force the library to render with canvas?

I find it a bit ironic that in the 4.6 API documentation, Esri even makes the effort to have this line in the section titled Add an array of client-slide graphics

"There is no limit to the number of graphics that may be added to a FeatureLayer via source."

New Contributor II


  I has same scenario. I trying load about 2 thounds polygon on feature layer via source property and i need frequently switch some polygons to another polygons. I found if i use same feature layer then call applyEdits to delete/add polygon, sometimes some polygon is keep on screen(should be disappeare). Then i try delete whole feature layer then recreate new, it look like cause memory leak and many console warning "WARNING: Too many active WebGL contexts. Oldest context will be lost."

0 Kudos