<?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 Creating new map panes gets slower and slower in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/creating-new-map-panes-gets-slower-and-slower/m-p/826562#M3067</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have some code that creates a new map in a new map pane in response to a tool run by the user.&amp;nbsp; A very simplified version of the code looks something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Map myNewMap;&lt;/P&gt;&lt;P&gt;await QueuedTask.Run(async() =&amp;gt;&lt;BR /&gt; {&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;myNewMap&amp;nbsp;&lt;/SPAN&gt;= MapFactory.Instance.CreateMap(mapName);&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;myNewMap&lt;/SPAN&gt;.SetSpatialReference(someOtherMap.SpatialReference);&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Some other stuff happens with myNewMap here.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;await QueuedTask.Run(async () =&amp;gt;&lt;BR /&gt; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;IMapPane myNewMapPane = await ProApp.Panes.CreateMapPaneAsync(&lt;SPAN&gt;myNewMap&lt;/SPAN&gt;, someOtherMapExtent);&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This all seems very straight forward, but&amp;nbsp;I've noticed that after a few new panes have been created, this code&amp;nbsp;runs slower and slower each time another new map/pane is created.&amp;nbsp; If I go and manually close&amp;nbsp;all of the newly created map panes, the code goes back to running the original speed, but then slows down again as more&amp;nbsp;panes are again added.&amp;nbsp; Has anyone else experienced this?&amp;nbsp; Any ideas how to fix this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 01 Sep 2020 19:43:34 GMT</pubDate>
    <dc:creator>KarenMeinstein</dc:creator>
    <dc:date>2020-09-01T19:43:34Z</dc:date>
    <item>
      <title>Creating new map panes gets slower and slower</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/creating-new-map-panes-gets-slower-and-slower/m-p/826562#M3067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have some code that creates a new map in a new map pane in response to a tool run by the user.&amp;nbsp; A very simplified version of the code looks something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Map myNewMap;&lt;/P&gt;&lt;P&gt;await QueuedTask.Run(async() =&amp;gt;&lt;BR /&gt; {&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;myNewMap&amp;nbsp;&lt;/SPAN&gt;= MapFactory.Instance.CreateMap(mapName);&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;myNewMap&lt;/SPAN&gt;.SetSpatialReference(someOtherMap.SpatialReference);&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Some other stuff happens with myNewMap here.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;await QueuedTask.Run(async () =&amp;gt;&lt;BR /&gt; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;IMapPane myNewMapPane = await ProApp.Panes.CreateMapPaneAsync(&lt;SPAN&gt;myNewMap&lt;/SPAN&gt;, someOtherMapExtent);&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This all seems very straight forward, but&amp;nbsp;I've noticed that after a few new panes have been created, this code&amp;nbsp;runs slower and slower each time another new map/pane is created.&amp;nbsp; If I go and manually close&amp;nbsp;all of the newly created map panes, the code goes back to running the original speed, but then slows down again as more&amp;nbsp;panes are again added.&amp;nbsp; Has anyone else experienced this?&amp;nbsp; Any ideas how to fix this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Sep 2020 19:43:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/creating-new-map-panes-gets-slower-and-slower/m-p/826562#M3067</guid>
      <dc:creator>KarenMeinstein</dc:creator>
      <dc:date>2020-09-01T19:43:34Z</dc:date>
    </item>
  </channel>
</rss>

