Select to view content in your preferred language

LayerFactory.Instance.CreateLayer() slowly

504
0
04-03-2023 01:40 PM
jefferson_bzp
Emerging Contributor

I noticed a big delay when using CreateLayer from .lyr using the SDK 3.1, below are the test scenarios.

ArcGIS Pro SDK 3.1

Scenario 1:
I created a layer from a .lyr file in my local directory, when using
LayerFactory.Instance.CreateLayer(myLayerFomLocal, myActiveMap), it takes about 5min to execute the instruction.

Scenario 2:
The same instruction as in scenario 1 is executed, but now pointing to the layer in my geodatabase and the instruction executes in seconds.
LayerFactory.Instance.CreateLayer(myLayerFromGDB, myActiveMap).

The layer saved in the local directory (.lyr) is the same as the one in the geodatabase, to perform the test the layer that was in the geodatabase was saved in a local directory.

ArcGIS Pro SDK 2.9
The same test scenarios above were performed, however the time for scenario 1 was about 1min30s and for scenario 2 it kept running in seconds.

Tests were performed on the following machine specification:
Win 10 - 64x
20GB Ram
Core I5 2.5GHz

Thanks,

Tags (1)
0 Kudos
0 Replies