<?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 Python Toolbox Initialization ArcPro Version 2.0 Vs ArcPro Version 2.2 in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/python-toolbox-initialization-arcpro-version-2-0/m-p/226469#M9847</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To my ArcPy Colleagues,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have recently upgraded from ArcPro Version 2.0 to ArcPro Version 2.2, but have noticed substantial time differences when initializing custom python toolboxes.&amp;nbsp; I've reduced the code down to parameters and a blank external script and have started honing in on a few potential culprits including the number of parameters and the number of external scripts loaded.&amp;nbsp; It appears each parameter adds time&amp;nbsp;to the initialization in ArcPro 2.2, however, has no influence on initialization time in ArcPro 2.0.&amp;nbsp; This time gets extended further when adding external scripts through this technique:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Import ModuleX&lt;/P&gt;&lt;P&gt;Import importlib&lt;/P&gt;&lt;P&gt;importlib.reload(ModuleX)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am wondering if anyone else has had this issue and if they can explain why this issue is occurring and how to prevent it.&amp;nbsp; In addition, this exact same code in ArcMap initializes almost instantaneously with many more parameters and multiple Import calls to custom scripts.&amp;nbsp; I've attached a generic .pyt code so you can test the custom python toolbox in ArcPro yourself.&amp;nbsp; (the Import externalScript line is a placeholder for an external script so you can create this file and fill it with code, and you will see there is additional delay when initializing)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Summarizing -&amp;nbsp; When running the Python Toolbox on ArcPro Version 2.0, the tool initializes instantly.&amp;nbsp; I only started noticing the problem when I upgraded to ArcPro 2.2 about a week ago.&amp;nbsp; So, clearly, it has something to do with the new version of ArcPro.&amp;nbsp; My solution for now is to downgrade to ArcPro Version 2.0, however, this is not ideal.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if you have any ideas or solutions to get this to work on ArcPro Version 2.2!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Aug 2018 19:57:54 GMT</pubDate>
    <dc:creator>JimHowser</dc:creator>
    <dc:date>2018-08-16T19:57:54Z</dc:date>
    <item>
      <title>Python Toolbox Initialization ArcPro Version 2.0 Vs ArcPro Version 2.2</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/python-toolbox-initialization-arcpro-version-2-0/m-p/226469#M9847</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To my ArcPy Colleagues,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have recently upgraded from ArcPro Version 2.0 to ArcPro Version 2.2, but have noticed substantial time differences when initializing custom python toolboxes.&amp;nbsp; I've reduced the code down to parameters and a blank external script and have started honing in on a few potential culprits including the number of parameters and the number of external scripts loaded.&amp;nbsp; It appears each parameter adds time&amp;nbsp;to the initialization in ArcPro 2.2, however, has no influence on initialization time in ArcPro 2.0.&amp;nbsp; This time gets extended further when adding external scripts through this technique:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Import ModuleX&lt;/P&gt;&lt;P&gt;Import importlib&lt;/P&gt;&lt;P&gt;importlib.reload(ModuleX)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am wondering if anyone else has had this issue and if they can explain why this issue is occurring and how to prevent it.&amp;nbsp; In addition, this exact same code in ArcMap initializes almost instantaneously with many more parameters and multiple Import calls to custom scripts.&amp;nbsp; I've attached a generic .pyt code so you can test the custom python toolbox in ArcPro yourself.&amp;nbsp; (the Import externalScript line is a placeholder for an external script so you can create this file and fill it with code, and you will see there is additional delay when initializing)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Summarizing -&amp;nbsp; When running the Python Toolbox on ArcPro Version 2.0, the tool initializes instantly.&amp;nbsp; I only started noticing the problem when I upgraded to ArcPro 2.2 about a week ago.&amp;nbsp; So, clearly, it has something to do with the new version of ArcPro.&amp;nbsp; My solution for now is to downgrade to ArcPro Version 2.0, however, this is not ideal.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if you have any ideas or solutions to get this to work on ArcPro Version 2.2!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2018 19:57:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/python-toolbox-initialization-arcpro-version-2-0/m-p/226469#M9847</guid>
      <dc:creator>JimHowser</dc:creator>
      <dc:date>2018-08-16T19:57:54Z</dc:date>
    </item>
    <item>
      <title>Re: Python Toolbox Initialization ArcPro Version 2.0 Vs ArcPro Version 2.2</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/python-toolbox-initialization-arcpro-version-2-0/m-p/226470#M9848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm also experiencing extremely slow initializing times for my script tools that have several input parameters. In my case (v2.3.1), I have 10 input parameters and my tool takes several minutes to initialize before it even start running the python code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Mar 2019 11:57:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/python-toolbox-initialization-arcpro-version-2-0/m-p/226470#M9848</guid>
      <dc:creator>ChrisKrebs1</dc:creator>
      <dc:date>2019-03-26T11:57:09Z</dc:date>
    </item>
  </channel>
</rss>

