Select to view content in your preferred language

ArcGIS Pro Map Tool (Add-In) - super slow activating first time?

1829
5
12-08-2020 08:23 AM
bbieb
by
Frequent Contributor

I've created a ArcGIS Pro Map Tool (Add-In) and when I activate it the first time in a session, it takes 15+ seconds before it becomes active.  Is this normal?

Once the tool has been activated in a session, the next time it is activates immediately.

 

brian
Tags (3)
0 Kudos
5 Replies
Wolf
by Esri Regular Contributor
Esri Regular Contributor

This is not normal.  Usually, at least in my experience, Map tools activate with no noticeable delay.  There are other issues that can cause a delay in activation.  First ArcGIS Pro is using JIT (Just In Time) loading of your add-in (see https://github.com/Esri/arcgis-pro-sdk/wiki/ProConcepts-Framework#jit-loading  ) which can cause a delay if your add-in takes a long time to load and/or initialize.  Secondly, any activity in the mapview can cause a map tool's activation delay as well, so i would also watch for any map activities going on in the background.

0 Kudos
bbieb
by
Frequent Contributor

Thanks for responding.  I went back and created a vanilla ArcPro Project and a vanilla Add-In with a single Map Tool (no further coding).  The tool activates right away.  If I add feature class layers to the vanilla project (SQL Server SDE/AD Security through VPN), save and reopen again, the activation takes 15+ secs.  Remove the layers and the tool activates right away.   Is the "map tool" checking the connections or opening an edit session or ?  And if so, is there a way to prevent that behavior?

brian
0 Kudos
Wolf
by Esri Regular Contributor
Esri Regular Contributor

Let me check with product development, i will get back to you about this.

0 Kudos
bbieb
by
Frequent Contributor

Any response?

brian
0 Kudos
BrianBulla
Honored Contributor

Hi.  Just saw this thread and I would say that most of my tools definitely have a delay the first time you run them too.  I create all mine in Visual Studio (C#).  If there is anything to try to help improve the performance of that 'first click', I'd be interested too.

Thanks,

0 Kudos