AnsweredAssumed Answered

Time to Run Scripts in Various IDEs / Editors

Question asked by pts3 on Oct 27, 2019
Latest reply on Dec 15, 2019 by pts3

Wanted to ask if anyone else has experienced this, or could provide any insight or ideas. I'd used PythonWin for scripting with arcpy in the past, and it seemed quick and light, no real issues. On and off over the last year or so I've experimented with other more modern IDEs / editors with more bells and whistles, but I've noticed that my scripts take longer to run in every other program...

 

In PythonWin, usually the first run of a .py file takes a few extra seconds, I'm guessing when importing arcpy - but subsequent runs are usually very quick. In the other programs I've tried to-date, each run takes nearly as long as the first, usually adding anywhere from ~10 to 20sec when compared to PythonWin. For example, in PythonWin, a first run might take ~12sec to run, but subsequent runs are under a second. In the others, time elapsed would always be close to the first run time taken. I've observed this behavior in Visual Studio Code, Sublime Text, PyCharm (and I believe Spyder a while back too). I really like at least some features available in each of the programs listed, and the extra time is not a deal-breaker, just bothersome.

 

Would this have something to do with how the programs themselves run, or is something else more likely, such as configuration, or install locations, etc.? I do see that PythonWin is installed in C:\Python27\ArcGIS10.6\Lib\site-packages, so maybe that is part of the answer...

 

PythonWin running 2.7, other programs 2.7 or 3.6 (same running time issue observed in 3.6)

 

Thanks

Paul

Outcomes