Hi Collin,
Just checked this python toolbox back in ArcMAP 10.6 AND ArcGIS Pro 2.1.3 and 2.2.
import arcpy
class Toolbox(object):
def __init__(self):
"""Define the toolbox (the name of the toolbox is the name of the
.pyt file)."""
self.label = "Toolbox"
self.alias = ""
self.tools = [Tool]
class Tool(object):
def __init__(self):
"""Define the tool (tool name is the name of the class)."""
self.label = "Tool"
self.description = ""
self.canRunInBackground = False
def getParameterInfo(self):
"""Define parameter definitions"""
point = arcpy.Parameter(
displayName= "buffer center",
name="buffer center",
datatype="GPFeatureRecordSetLayer",
parameterType="Required",
direction="Input")
params = [point]
return params
def isLicensed(self):
"""Set whether tool is licensed to execute."""
return True
def updateParameters(self, parameters):
"""Modify the values and properties of parameters before internal
validation is performed. This method is called whenever a parameter
has been changed."""
return
def updateMessages(self, parameters):
"""Modify the messages created by internal validation for each tool
parameter. This method is called after internal validation."""
return
def execute(self, parameters, messages):
import time;
"""The source code of the tool."""
def createDistances(incr,maximum):
distances = []
for dist in range(incr,maximum+1,incr):
distances.append(str(dist))
distancesString = ";".join(distances)
return distancesString
distancesString = createDistances(100,1000)
i=0;
while i<10:
start = time.time()
arcpy.analysis.MultipleRingBuffer(parameters[0].value, "tester" + str(i), distancesString, "Meters", "distance", "ALL", "FULL")
end = time.time()
arcpy.AddMessage(end - start)
i+=1
return
The results show significant perfomance boost on my machine!
The raw values in seconds are shown here:
I can see a performance bioost of about 20x compared to ArcMAP and 50x compared to ArcGIS Pro 2.1.3 using ArcGIS Pro 2.2