Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am finding ArcMap runs slower, if you have written a script, which imports arcpy.

You may wish to write a script that can be operated in ArcMap, through the python window, or as a standalone python script. If so, you'll have to import arcpy. However, if you do this and run it in the python window, it will run slower.

share|improve this question
up vote 11 down vote accepted

I have put this code into my script and it runs much quicker:

except NameError:
    import arcpy

This is saving considerable time in our scripts in ArcMap now.

This may all change in SP2, but none the less...

share|improve this answer

ArcGIS needs to spin up the runtime (that means loading a fairly sizable number of DLLs) when a process first loads the ArcObjects runtime. It's the same as the time going from the splash dialog in ArcMap to the ArcMap window or the time it takes to spin up an ArcGIS Engine process. In ArcMap the DLLs are already loaded for you so this process has already been done for you.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.