Select to view content in your preferred language

What causes a slow analysis of a python tool in Pro?

377
5
Jump to solution
09-30-2024 01:54 AM
Stefan_Offermann
Occasional Contributor

My python tool is suddenly slower than usual in ArcGIS Pro 3.3, nothing happens before the first message gets logged. I enabled the debugging of the GP tools and found this (parts of the output are in german language): The tool  has  a very long pre execution time, what could possibly be the reason for that? The tool is written in a Python Toolbox with the pyt extension.

DEBUG: ProcessExecution of BerichtTool using ArcGISPro 3.3 (Build 52636)
DEBUG: GPEventTiming ProcessExecution found 0 issue(s) after analyzing tool for use within Pro time 310,893000
Startzeit: Montag, 30. September 2024 09:22:13 (13.3.0.52636)
DEBUG: GPEventTiming ProcessExecution PreExecution time 311,614000
Ausführung von: BerichtTool "C:\data\output.pdf"
Startzeit: Montag, 30. September 2024 09:27:24 (13.3.0.52636)
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
DanPatterson
MVP Esteemed Contributor

 

Project menu

options

p.png


... sort of retired...

View solution in original post

5 Replies
DanPatterson
MVP Esteemed Contributor

was it faster with the same data in a prior build?

are all the data locally stored?

what imports are you doing?

perhaps, showing the script would be useful


... sort of retired...
0 Kudos
Stefan_Offermann
Occasional Contributor

- I am not 100% sure if this correlates with the latest Pro 3.3.2 on my machine.

- data is stored in local FGDBs on drive C

- imports are: arcpy 🙂 os, datetime, time, json, subprocess, uuid, logging, tempfile, sys, configparser, pathlib from Path 

- other py files are also loaded from the pyt file

 

I have currently gained performance by switching off "Analyze script and model tools for ArcGIS Pro compatibility" --> Geoprocessing options—ArcGIS Pro | Documentation

This seems to run very long, but for what reason? some of my imports, my other py files?

0 Kudos
DanPatterson
MVP Esteemed Contributor

Analyze Tools For Pro (Data Management)—ArcGIS Pro | Documentation

can be run manually and there would be little use to run it if you are only using Pro, or after a successful run the first time.

I see no point in having it as part of your default options


... sort of retired...
0 Kudos
Stefan_Offermann
Occasional Contributor

As my tool was written for Pro and had no ancestor from ArcMap, the "Analyze Tools For Pro" tool results in "No problems" which is good.  Is the check for compatibility a default option? If this is not activated by default on every machine, I have no problem when this runs slow.

0 Kudos
DanPatterson
MVP Esteemed Contributor

 

Project menu

options

p.png


... sort of retired...