Is there any performance benefit in migrating a working python 2x script to 3x?

1117
7
06-29-2017 08:55 AM
JosephRathvon
Occasional Contributor

I have noticed increased speed in geoprocessing between ArcMap and pro.  Are the same increases apparent after migrating a python script using arcpy functions from the ArcMap compatible 2x version to the Pro compatible 3x version?  I have a script that is working in 2x but takes a couple of days to run. I am trying to see if it is worth the hassle to convert it to 3x.  I have started the process and keep running into issues getting the new script to run correctly. 

0 Kudos
7 Replies
MichaelVolz
Esteemed Contributor

Are you running the script on a desktop machine or a server?  If a server what version is it?

0 Kudos
JosephRathvon
Occasional Contributor

I am running it on a desktop machine. I usually use PyScripter but am transitioning to PyCharm.

0 Kudos
DanPatterson_Retired
MVP Emeritus

run py2to3 on your script, it will fix the pure python stuff.  The arcpy stuff isn't handled of course.  In theory your python IDE shouldn't matter at all

JoshuaBixby
MVP Esteemed Contributor

In addition to Dan's suggestion, it is also helpful to provide specifics about the issues you are running into.

0 Kudos
RebeccaStrauch__GISP
MVP Emeritus

I found that my arcpy 2.x script did ru  faster in pro. Many times no tweaks were required.  The exception would be if using a map document like CURRENT  which would require changes.

As the others have suggested, it would help to know a few more details.

DanPatterson_Retired
MVP Emeritus

If you can wait until Python 3.6... dictionaries and a variety of other things are now faster

0 Kudos