I've got a very simple code using an ArcPy tool to convert KMLs to Layers in a directory:
import arcpy, os
from arcpy import env
arcpy.env.workspace = r"C:\KML\Test"
outLocation = r"C:\KML\Test\Convert"
for kml in arcpy.ListFiles('*.KML'):
print "Converting {0}".format(os.path.join(arcpy.env.workspace, kml))
arcpy.KMLToLayer_conversion(kml, outLocation)
Each KML is no less than 20,000 KB and probably has 2000-3000 records per. On average, it is taking about 1.4 - 2 minutes for each KML to convert using the arcpy.KMLToLayer_conversion()
.
Any thoughts on if this is a memory issue? Not sure why it appears to be running so slow.
Also of note, import arcpy
causes the script to delay for about 5 seconds when it starts.
This code is run outside of ArcMap through IDLE.
arcpy.KMLToLayer_conversion(r"c:\temp\mykml.kml", r"c:\output")