ModelBuilder vs. python script performance

337
2
02-04-2014 12:22 PM
MehrshadNourani
New Contributor III
Hi,

I am trying to run an arcpy script on JoinField to join a feature class and a standalone table. The model runs the process rather quickly, but the script takes a long time to complete! Is there a way to have the script run at least as fast as the ModelBuilder?

here is the script:

import arcpy
>>> from arcpy import env
>>> env.workspace    = 'C:\\WorkSpace\\sahie\\sahie.gdb'
>>> cnty06           = 'C:\\WorkSpace\\sahie\\sahie.gdb\\cnty06'
>>> co06             = 'C:\\WorkSpace\\sahie\\sahie.gdb\\co06'
>>>
>>> arcpy.JoinField_management(cnty06,"GEO_ID",co06,"stcou","")
Tags (2)
0 Kudos
2 Replies
JohnDye
Occasional Contributor III
I'm not positive, but I think the answer here is going to be to create a script tool and then run it in process.

This help article should get you going.

Give it a shot and let us know if it helps.
0 Kudos
DanPatterson_Retired
MVP Emeritus
part of the time overhead is associated with importing arcpy.  Does the script run faster if you run it again?
0 Kudos