I wrote a python geoprocessing tool.
If I run it in Arcgis pro it takes about 11 minutes, but if I run it outside Arcgis pro it takes hours?
I don't know why!
The tool loops over records in a csv file (about 6700 rows)
For each row performs a spatial selection (arcpy.management.SelectLayerByLocation) creating a layer.
After that, it performs some selections and calculations with the selected features and write results in a file geodb table (see the attachment).
If I run the tool in Arcgis pro it takes about 1 seconds to process 10 record in the csv file.
When I run outside Arcgis pro, it starts with 1 sec for 10 recs, but after few loops it takes 1 second for 1 or 2 records.
Does anybody have any ideas or suggestions?
Thanks in advance.
Solved! Go to Solution.
You might check this out even if it refers to 10.3. in particular the use of layers over data on a drive. https://desktop.arcgis.com/en/arcmap/10.3/analyze/sharing-workflows/performance-tips-for-geoprocessi...
Kind of a long shot, but is your data on a network drive? That's usually what slows down my scripts (though the lag time is worse inside Pro than outside). If your data is not on your local machine, it could be a latency issue where the computer is having to work harder to access the data and write the results.