Hi all,
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.