ArcGIS Hub goes esri-loader: performance wins and lessons learned

Today’s ArcGIS Hub Changelog included this entry: “Sites & pages now load ~50% faster when a map is not present”. We achieved that by migrating ArcGIS Hub code base over to using esri-loader (via ember-esri-loader) to lazy load the ArcGIS API for JavaScript only when it’s needed (i.e. only on pages that have a map).

ArcGIS Hub & esri-loader logos

This was the largest such migration that I’ve taken on to date, and I learned a few things in the process that I thought are worth sharing. Although this post is about an Ember.js application, all but the last section equally apply to applications developed with other frameworks. Continue reading “ArcGIS Hub goes esri-loader: performance wins and lessons learned”

Loader of the Things: One Library to Load Them All

UPDATE 5/11/18: The recently released @arcgis/webpack-plugin is a viable alternative to esri-loader if you are using webpack with the latest version of the ArcGIS API for JavaScript. See this blog post for details on when you should use one or the other.

The esri-loader library hit the 2.0.0 milestone this week.  This release doesn’t add any features, but merely removes the old callback APIs that were deprecated when we introduced the promise-based ones in v1.5.0. If you’ve been using the new APIs, you can save yourself a few bytes by upgrading to 2.0.0. You can read more in the 2.0.0 release notes.

One does not simply load modules from the ArcGIS API

One does not simply load modules from the ArcGIS API

The work leading up to this milestone got me reflecting on the broader state of loading ArcGIS API for JavaScript modules and I came to this conclusion:

If your ArcGIS web application uses any other module loader besides the Dojo loader (i.e. webpack, Rollup.js, etc.), you should be using esri-loader.

That’s a bold statement, so let me back it up.

Continue reading “Loader of the Things: One Library to Load Them All”