Select to view content in your preferred language

Mapbox vs ArcGIS api - memory usage

364
1
02-25-2026 06:43 AM
michaelpoa
Regular Contributor

Hi Esri Community!

I'm testing mapbox / maplibre and leaflet at the moment and I see some big difference in performance and memory.

For example when creating a mapbox map with a simple vector layer and 10000 real time updating assets, I see:

leaf.png

When checking a simple Esri implementation in codepen: (not even 10000 assets)
https://codepen.io/pen?editors=1000

https://developers.arcgis.com/javascript/latest/sample-code/editing-featureform-fieldvisibility/

 

esri.png

 

What's the main difference? The only thing I want is to visualise a lot of features without any extras. Is there a mini version of the library? 

The goal is to make the application as fast as possible.


All tips are welcome! Thanks in advance

 

Gr

Michael

 

 

 

0 Kudos
1 Reply
YannCabon
Esri Contributor

Hi Michael,

Thanks for the question!

The link to the codepen is broken, if you don't mind reposting it.

The Maps SDK does have an overhead compared to other libraries due to the amount of out of the box functionalities and datasets it supports, as well as the developer experience it provides like property change tracking or client-side querying capabilities. All of which makes building rich applications faster and easier, where you may have to build a lot of custom code with other libs.

There are definitely areas to explore on the front of memory optimizations though.

For your use cases. The SDK provides different solutions for moving assets. First, I would say, favor using a client-side FeatureLayer instead of a GraphicsLayer (I'm making the assumption this is what the codepen was about). Check the class description section about creating a feature layer from an array of features. That offsets the memory and data processing to a worker.

The other option is to use a client-side stream layer. See the section in the StreamLayer class description, as well as this sample, or this one https://codepen.io/ycabon/pen/MYjYYNa?editors=1000 

(view in My Videos)


Yann