Announcements

How To: Use ArcGIS Pro PerfTools to measure performance of adding and rendering new layers

Adding new or additional layers to your maps or scenes is a common and essential task when using ArcGIS Pro.  This can have a major impact on performance.  The freely-available PerfTools Add-in for ArcGIS Pro allows you to easily measure these values.  Whether you’ve just rebuilt your spatial index or have made other optimizations, understanding how fast the underlying data loads is pivotal to a  responsive user experience.

(An earlier blog post discussed using PerfTools to measure rendering spatial bookmarks, an additional workflow for assessing the performance of your GIS project in ArcGIS Pro.)

Adding layers from a local geodatabase using the AddLayer command

  1. If you haven’t already done so, download, extract, and install the PerfTools Add-in.  As we will be testing adding data, all you’ll need is a new, blank, ArcGIS Pro project.
  2. Using the PerfTools Script View, enter the following command:

AddLayer C:MyDataCalifornia.gdbAirports”, “/map=Map”,

This command adds the Airports feature class from the locally-stored California geodatabase.  Note also that the “/map” argument allows you to specify to which map or scene within your Pro project you wish to add the data.  If this optional argument is left blank, whichever is the active map will receive the new layer.  Additionally, you can specify a new map name, and one will be automatically created for you.

Examining the Results in the Log View

If you examine the Log View, you will see results for the AddLayer command.  Specifically, “LayerAddedTime” and “DrawTime”.  The first measures the time to connect to and read in the data source, and the second describes the time it takes to render the data in the map display.

Other data types

AddLayers can be used to add other data types to your projects.  Here are a few examples:

Adding an enterprise geodatabase

You can add data from an already-established connection to an Enterprise Geodatabase.  The following example adds a feature class named “Streets” from a similarly-named feature dataset.  The connection, named “Connection to Zip5” was setup from the Insert menu > Connections.  Note also the “/gl” argument, which allows you to specify a new or existing group layer within the map.

AddLayer “C: ArcGISProjectsAddDataTestConnection to Zip5.sdeUSER1.StreetsUSER1.streets”, “/map=Map”, “/gl=Transportation”

Adding a shapefile

AddLayer “C:MyDataConterminousUSAWebMercator.shp”, “/map= Airports Map”

Adding an image

AddLayer “C:MyDataPhiladelphiaQ95.tif”, “/map=Map”

Adding a layer package

AddLayer “C:MyDataParks_&_Recreation.lpkx”

Adding a map service

AddLayer “http://maps1.arcgisonline.com/ArcGIS/rest/services/USA_Federal_Lands/MapServer”, “/map=Energy Resources”

Adding a feature service

AddLayer “http://services2.arcgis.com/FiaPA4ga0iQKduv3/arcgis/rest/services/EarthquakeFaults_USGS/FeatureServer”, “/map=Energy Resources”

Is the performance slower than you might expect?  Moving from slower network-mounted storage, upgrading to a solid-state drive, or clipping any images to areas closer to your area-of-interest are just a few of many spatial data performance tuning ideas.  Consider building second versions of these datasets and re-run these AddLayer scripts against this newly-optimized data.  Do you see any performance gains?

The AddLayer commands provide a simple, scriptable way to assess the performance impact of adding specific layers to your ArcGIS Pro project.  Feel free to experiment with these and provide us with your feedback.

About the author

Esri Performance Engineering. From Warwickshire, England. Mapper, photographer, explorer and technology evangelist.

Connect:

Next Article

Make This Dymaxion Globe Ornament Please

Read this article