Select to view content in your preferred language

Speed up Geoprocessing tools

222
2
4 weeks ago
MK13
by
Frequent Contributor

Is there a way to speed up GP tools? I am running the GP tool below

await Geoprocessing.ExecuteToolAsync("gapro.DissolveBoundaries", paramsDissolveBndry)

 and it takes 20s to run. It doesn't seem like much but I am running it as part of a loop that runs for hundreds of iterations. I have 2 other GP tools in my code and they slow it down considerably. When I timed my code, the slowest parts are the GP tools by far. Any tips to optimise them?

@UmaHarano @Wolf @CharlesMacleod 

Tags (2)
0 Kudos
2 Replies
MK13
by
Frequent Contributor
0 Kudos
Wolf
by Esri Regular Contributor
Esri Regular Contributor

When you use ExecuteToolAsync in a loop, I would recommend setting the GPExecuteToolFlags to GPExecuteToolFlags.None (GPExecuteToolFlags Enumeration—ArcGIS Pro)  except for your last loop.   For your last ExecuteToolAsync call use GPExecuteToolFlags.Default

0 Kudos