<?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: Strip ArcPy Libraries in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/strip-arcpy-libraries/m-p/51574#M4097</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This isn't worth chasing.&amp;nbsp; What are you hoping to gain?&amp;nbsp; Quicker start/load times?&amp;nbsp; The vast majority of the ArcPy startup time is licensing activation, and you will have to activate a license even if just using a single piece of ArcPy code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Mar 2020 15:07:59 GMT</pubDate>
    <dc:creator>JoshuaBixby</dc:creator>
    <dc:date>2020-03-05T15:07:59Z</dc:date>
    <item>
      <title>Strip ArcPy Libraries</title>
      <link>https://community.esri.com/t5/python-questions/strip-arcpy-libraries/m-p/51572#M4095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp; Just wondering if anyone has ever investigated the idea of stripping down the arcpy libraries to decrease load time.&amp;nbsp; We have a few processing machines running scripts that only ever use a given set of geoprocessing tools.&amp;nbsp; Yet, presumably when arcpy loads, all libraries are loaded even though we are only using a small percentage.&amp;nbsp; Obviously the installation on the machines targeted could only be use for vetted processes afterward.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Mar 2020 14:27:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/strip-arcpy-libraries/m-p/51572#M4095</guid>
      <dc:creator>MikeMcmanus</dc:creator>
      <dc:date>2020-03-05T14:27:31Z</dc:date>
    </item>
    <item>
      <title>Re: Strip ArcPy Libraries</title>
      <link>https://community.esri.com/t5/python-questions/strip-arcpy-libraries/m-p/51573#M4096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you know what you want to use, you can import directly&lt;/P&gt;&lt;P&gt;For instance&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;from&lt;/SPAN&gt; arcpy &lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; gp

&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcgisscripting &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; ags
‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;You can follow the import chain by examining the code in the import path (look for __init__ files)&lt;/P&gt;&lt;P&gt;For example, when you import arcpy, the path is as follows, and the imports cascade within the imports therein.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;C:\YourProInstallFolder\Resources\ArcPy\arcpy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, arcgisscripting is located in&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;C:\&lt;SPAN&gt;YourProInstallFolder&lt;/SPAN&gt;\bin\Python\envs\arcgispro-py3\Lib\site-packages&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if you only need the geoprocessor, or the data access stuff, just import those directly.&lt;/P&gt;&lt;P&gt;You will eventually develop a "chain of command" to limit importing everything in the namespace.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:59:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/strip-arcpy-libraries/m-p/51573#M4096</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-10T21:59:24Z</dc:date>
    </item>
    <item>
      <title>Re: Strip ArcPy Libraries</title>
      <link>https://community.esri.com/t5/python-questions/strip-arcpy-libraries/m-p/51574#M4097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This isn't worth chasing.&amp;nbsp; What are you hoping to gain?&amp;nbsp; Quicker start/load times?&amp;nbsp; The vast majority of the ArcPy startup time is licensing activation, and you will have to activate a license even if just using a single piece of ArcPy code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Mar 2020 15:07:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/strip-arcpy-libraries/m-p/51574#M4097</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2020-03-05T15:07:59Z</dc:date>
    </item>
    <item>
      <title>Re: Strip ArcPy Libraries</title>
      <link>https://community.esri.com/t5/python-questions/strip-arcpy-libraries/m-p/51575#M4098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wise words.&amp;nbsp;&amp;nbsp; Thanks for the info.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Mar 2020 15:25:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/strip-arcpy-libraries/m-p/51575#M4098</guid>
      <dc:creator>MikeMcmanus</dc:creator>
      <dc:date>2020-03-05T15:25:05Z</dc:date>
    </item>
    <item>
      <title>Re: Strip ArcPy Libraries</title>
      <link>https://community.esri.com/t5/python-questions/strip-arcpy-libraries/m-p/51576#M4099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are trying to reduce the memory footprint of the ArcPy session, well, you are out of luck.&amp;nbsp; It is true that loading ArcPy (ArcPy for Pro) takes a Python session from 15 MB to nearly 200 MB, but there isn't much you can do about it.&amp;nbsp; If you profile the memory usage of the Python session after loading ArcPy, you will see that a handful of DLLs counts for a vast majority of that increase, and those DLLs are fundamental to the operation of any ArcPy code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Mar 2020 16:29:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/strip-arcpy-libraries/m-p/51576#M4099</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2020-03-05T16:29:17Z</dc:date>
    </item>
    <item>
      <title>Re: Strip ArcPy Libraries</title>
      <link>https://community.esri.com/t5/python-questions/strip-arcpy-libraries/m-p/51577#M4100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well I for one would like to know why my startup time is up to 5 times longer than others and if there's anything I can do about it &lt;A href="https://community.esri.com/message/913697-what-is-your-import-arcpy-overhead"&gt;https://community.esri.com/message/913697-what-is-your-import-arcpy-overhead&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Mar 2020 22:50:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/strip-arcpy-libraries/m-p/51577#M4100</guid>
      <dc:creator>MattWilkie1</dc:creator>
      <dc:date>2020-03-05T22:50:38Z</dc:date>
    </item>
  </channel>
</rss>

