Select to view content in your preferred language

Make arcpy import faster

1093
3
03-30-2023 03:36 PM
Status: Open
I_AM_ERROR
Regular Contributor

From what I've read in various discussions, arcpy need to ping a license server, then after timing out, check if you have a license checked out.

Could we add functionality such that it looks for a checked out license first and not have to wait for the license server check to time out? (slow process).

Debug sessions requiring subsequent exaction are extremely slow right now with the current process.

 

Tags (2)
3 Comments
DavidSolari

At this point esri should bite the bullet and just remove the license checks from arcpy in general. You still need the Desktop files to run the modules and the number of customers with Desktop licenses and nothing else has to be in single percentiles by this point, it doesn't seem worth the hassle to shove license checks everywhere for the base functionality.

EsriQruqs

I would suggest splitting it up into chunks, much like toolbox itself.

If you need this feature, load the part that contains it only, I don't need 3D if I'm going to interrogate a table for its contents of text attributes. Has to be faster. Waiting ten-fifteen seconds for that monster to load is a nuisance.

I usually put the import in the function that can't live without it. Ugly, but stems from sheer frustration with the sluggish behavior.

 

MarkGo
by

This is beyond frustrating. I'm developing code that will not run within Arc Pro, therefore using an external editor (VS Code in my case).
In order to test the code, I am running it dozens of times a day. 

It was taking so long to run each time that I started diving into the reasons. 

I setup a script utilizing timeit for the sole purpose of benchmarking the import for arcpy & GIS from arcgis.gis
I've clocked it at anywhere from 8 seconds to over 2 minutes.
In one test, it took 27 seconds just to import GIS - and this was in the python window in Pro!!!

Would love a solution, since this makes testing my code an absolute chore.