ArcGIS Blog

Mapping

ArcGIS Maps SDK for JavaScript

Performance improvements in version 4.21 of the ArcGIS API for JavaScript

By Anne Fitz

Many performance improvements were introduced in version 4.21 of the ArcGIS API for JavaScript that will decrease the draw time of your layers. These improvements have far-reaching effects across the ArcGIS ecosystem, as many of Esri’s online products — Map Viewer, Storymaps, Dashboards, Instant Apps, and Experience Builder — use the 4.x JavaScript API under the hood.

In summary, we’ve improved draw time for layers with complex polygons (large number of vertices), large layers with many polygons, and maps with multiple graphics layers.

Complex polygons

For polygons with a large number of vertices, layer draw time has significantly improved. Behind the scenes, we added a new simplification algorithm to preprocess the geometries to optimize memory management. We’ve migrated our triangulation code to WebAssembly, which has significantly sped up the time needed to process these types of features. These improvements are specific to complex polygons, and have led to an improved draw time for these polygon features. In this example below, the Artic sea ice layer loads over 5x faster than the same layer in version 4.20.

A large polygon of artic sea ice loads 5x faster in version 4.21 of the ArcGIS API for JavaScript.

This improvement varies layer by layer, but for most polygons with a large number of vertices, we have seen at least a 20% faster draw time.

This layer draws 50% faster with the latest updates to Map Viewer (bottom)

Large layers with many polygons

We’re also seeing more typical datasets benefit from the optimization work mentioned above. For feature layers with a large volume of polygons, we’ve seen about a 20% improvement in draw time.

Comparing draw time in version 4.20 and 4.21 for a layer with over 73,000 polygons.

Maps with many layers

We’ve also added some optimizations for the way we handle maps with a large number of layers, especially those that contain multiple graphics layers. These optimizations have resulted in an improved start time and a better frame rate for smoother map panning and zooming.

Maps with multiple layers in version 4.21 (right side) have a better panning and zooming experience, especially on mobile devices.

But wait, there’s more…

While performance improvements were a big part of the version 4.21 release, check out the Release notes for the full list of what’s new in the ArcGIS API for JavaScript. Also, make sure you check out all the great new functionality in the September release of the Map Viewer!

Share this article

Subscribe
Notify of
0 Comments
Oldest
Newest
Inline Feedbacks
View all comments