Creating new map panes gets slower and slower

09-01-2020 12:43 PM
Occasional Contributor

I have some code that creates a new map in a new map pane in response to a tool run by the user.  A very simplified version of the code looks something like this:

Map myNewMap;

await QueuedTask.Run(async() =>
      myNewMap = MapFactory.Instance.CreateMap(mapName);

//Some other stuff happens with myNewMap here.....

await QueuedTask.Run(async () =>

      IMapPane myNewMapPane = await ProApp.Panes.CreateMapPaneAsync(myNewMap, someOtherMapExtent);


This all seems very straight forward, but I've noticed that after a few new panes have been created, this code runs slower and slower each time another new map/pane is created.  If I go and manually close all of the newly created map panes, the code goes back to running the original speed, but then slows down again as more panes are again added.  Has anyone else experienced this?  Any ideas how to fix this?

Tags (1)
0 Kudos
0 Replies