<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: arcpy load time suddenly long in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcpy-load-time-suddenly-long/m-p/331838#M25815</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-  All of the paths listed in the "Desktop10.3.pth" appear to be correct&lt;/P&gt;&lt;P&gt;- I am running a floating license.  It's possible that this IS the&lt;/P&gt;&lt;P&gt;problem...it takes about 20 seconds for ArcMap to open, perhaps a few&lt;/P&gt;&lt;P&gt;seconds LESS than my script is taking to fire.  This is a little hard to&lt;/P&gt;&lt;P&gt;judge because ArcMap always takes a little while to open.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Mar 2015 06:08:55 GMT</pubDate>
    <dc:creator>ChipHankley1</dc:creator>
    <dc:date>2015-03-10T06:08:55Z</dc:date>
    <item>
      <title>arcpy load time suddenly long</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-load-time-suddenly-long/m-p/331836#M25813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;arcpy is taking a LONG time (30 seconds) to load.&amp;nbsp; Just a simple script like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
x=5
print x * 5&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...takes about 30 seconds before I see the output.&amp;nbsp; This appears to be the same for&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;64 or 32 bit python&lt;/LI&gt;&lt;LI&gt;run via IDLE or run straight through the Python interpreter (e.g. double-clicking on the *.py file)&lt;/LI&gt;&lt;/UL&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P&gt;Of course if I comment out the "import arcpy" line, the script runs instantaneously.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This came on rather suddenly.&amp;nbsp; The only recent major change that I know of was installing 10.3, although I know that I have run scripts since then and they ran fine (no lag loading arcpy).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is an (otherwise) smoking fast machine... 16 GB RAM, SSD, etc.&amp;nbsp; Windows 8.1, ArcGIS 10.3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas on what to check???&amp;nbsp; TIA.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 15:42:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-load-time-suddenly-long/m-p/331836#M25813</guid>
      <dc:creator>ChipHankley1</dc:creator>
      <dc:date>2021-12-11T15:42:55Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy load time suddenly long</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-load-time-suddenly-long/m-p/331837#M25814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is definitely taking way longer. Generally it should be anything between 5 to 10 secs. Can you do a quick check for the following?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Check .pth file to see if the paths are mapped correctly for ArcGIS 10.3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Check if you have issues initializing a product license. Do you have multiple products installed? Are you using floating license or single use license?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Mar 2015 05:57:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-load-time-suddenly-long/m-p/331837#M25814</guid>
      <dc:creator>SachinKanaujia</dc:creator>
      <dc:date>2015-03-10T05:57:14Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy load time suddenly long</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-load-time-suddenly-long/m-p/331838#M25815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-  All of the paths listed in the "Desktop10.3.pth" appear to be correct&lt;/P&gt;&lt;P&gt;- I am running a floating license.  It's possible that this IS the&lt;/P&gt;&lt;P&gt;problem...it takes about 20 seconds for ArcMap to open, perhaps a few&lt;/P&gt;&lt;P&gt;seconds LESS than my script is taking to fire.  This is a little hard to&lt;/P&gt;&lt;P&gt;judge because ArcMap always takes a little while to open.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Mar 2015 06:08:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-load-time-suddenly-long/m-p/331838#M25815</guid>
      <dc:creator>ChipHankley1</dc:creator>
      <dc:date>2015-03-10T06:08:55Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy load time suddenly long</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-load-time-suddenly-long/m-p/331839#M25816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you have a single use license? Or else Can you try installing a 30 days evaluation version and use a local single use license and see how much time it takes?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Mar 2015 06:29:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-load-time-suddenly-long/m-p/331839#M25816</guid>
      <dc:creator>SachinKanaujia</dc:creator>
      <dc:date>2015-03-10T06:29:30Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy load time suddenly long</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-load-time-suddenly-long/m-p/331840#M25817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm marking this as the correct answer, although some explanation applies.&amp;nbsp; I think this has to do with network traffic to the license server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's a more complete script for testing this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import time
import sys
t_start = time.clock()
import arcpy
print "&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ... complete in %s seconds." % (time.clock() - t_start)&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Initially, this was taking about 38 seconds to run in IDLE.&amp;nbsp; After the resolution below, it takes about 8 seconds (still unacceptably long in my opinion).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my case, I have a remote license server.&amp;nbsp; I initiate a VPN connection, which allows my machine to "see" the remote server.&amp;nbsp; I was using the format &lt;STRONG&gt;port@IP&lt;/STRONG&gt; to point at my license server.&amp;nbsp; I changed this &lt;STRONG&gt;to simply point at the name of the server&lt;/STRONG&gt;, and I added an entry in my &lt;STRONG&gt;hosts file&lt;/STRONG&gt; to resolve the IP address of the host.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Furthering my suspicion that this has to do with a license server communication, I ran the above code in the Python window from within ArcMap and it runs immediately (way, way less than a second).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 15:42:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-load-time-suddenly-long/m-p/331840#M25817</guid>
      <dc:creator>ChipHankley1</dc:creator>
      <dc:date>2021-12-11T15:42:58Z</dc:date>
    </item>
  </channel>
</rss>

