I am writing python script on ArcGIS 10.2.2 and found some strange bug.
I use merge tool to process 498 shape files (they are located on a hard drive). Using arcpy script it takes 6 minutes, but when I run the same tool with the same shape files it takes 6 seconds to complete the task in ArcMAP interface!
The output of the tool goes to in_memory workspace in both situations.
I tried to use copy feature tool to put all shape files into memory before I run merge tool - no luck.
Also I tried to use make feature layer tool and use output files as input to merge tool - no luck again.
How to make this tool works same fast as in ArcMAP interface?
I use standart ArcGIS 10.2.2 python installation: IDLE 2.7.5, Python version 2.7.5, Tk version 8.5.2.
When I run PolyGeo's script from IDLE interface, it gives:
ArcPy import took 3.96323227335 seconds
Merge took 316.568876475 seconds
Runnig PolyGeo's script from ArcMap's python interface, it gives:
ArcPy import took 9.65935383235e-06 seconds
Merge took 364.072804059 seconds
Running Merge tool with same shapefiles from ArcMAP's interface gives:
Elapsed Time: 6,39 seconds